Major Bug in UBB 6.1x - 12/13/2001 2:07 PM
I hope this is the right place to post this. There is a major bug in UBB6.1x. After a member name is deleted from the Control Panel, his/her public name still exists, and as a result nobody can register if this public name matches with the member name, which, by the way, is the default (public name=member name if left blank).
To fix this:
####===========================
in cp_users.cgi
####===========================
####find:
local (%user_change, %user_delete, $key, $j, $user_number, $delete, @updated_mems, @updated_emails, $one, $delete_count, @mod_profile, $perms, $new_perms, $forums);
####replace with:
local (%user_change, %user_delete, $key, $j, $user_number, $delete, @updated_mems, @updated_pnames, @updated_emails, $one, $delete_count, @mod_profile, $perms, $new_perms, $forums);
####after:
my @the_members = &OpenFileAsArray("$vars_config{MembersPath}/memberslist.cgi");
####add:
my @the_pnames = &OpenFileAsArray("$vars_config{MembersPath}/public_names.cgi");
####after:
push (@updated_mems, $one);
}
####add:
# amend publicname
PNAMECHECK: foreach $one (@the_pnames) {
chomp($one);
foreach $key (keys %user_delete) {
if ($one =~ /$key$/) {
next PNAMECHECK;
}
}
push (@updated_pnames, $one);
}
####after:
&WriteFileAsArray("$vars_config{MembersPath}/memberslist.cgi", @updated_mems);
####add:
&WriteFileAsString("$vars_config{MembersPath}/public_names.cgi", @updated_pnames);
####done#####
[ 12-13-2001 06:09 AM: Message edited by: freeTV ]
To fix this:
####===========================
in cp_users.cgi
####===========================
####find:
local (%user_change, %user_delete, $key, $j, $user_number, $delete, @updated_mems, @updated_emails, $one, $delete_count, @mod_profile, $perms, $new_perms, $forums);
####replace with:
local (%user_change, %user_delete, $key, $j, $user_number, $delete, @updated_mems, @updated_pnames, @updated_emails, $one, $delete_count, @mod_profile, $perms, $new_perms, $forums);
####after:
my @the_members = &OpenFileAsArray("$vars_config{MembersPath}/memberslist.cgi");
####add:
my @the_pnames = &OpenFileAsArray("$vars_config{MembersPath}/public_names.cgi");
####after:
push (@updated_mems, $one);
}
####add:
# amend publicname
PNAMECHECK: foreach $one (@the_pnames) {
chomp($one);
foreach $key (keys %user_delete) {
if ($one =~ /$key$/) {
next PNAMECHECK;
}
}
push (@updated_pnames, $one);
}
####after:
&WriteFileAsArray("$vars_config{MembersPath}/memberslist.cgi", @updated_mems);
####add:
&WriteFileAsString("$vars_config{MembersPath}/public_names.cgi", @updated_pnames);
####done#####
[ 12-13-2001 06:09 AM: Message edited by: freeTV ]