Forbid adding duplicate users with the name of "0".
Previously, it was possible due to 0 and "0" being equivalent in Perl.
This commit is contained in:
parent
2e8685abef
commit
556b4b94e1
@ -319,7 +319,7 @@ sub new_users_name {
|
||||
warn "Username is longer than 16 chars\a\n";
|
||||
next;
|
||||
}
|
||||
last if (&new_users_name_valid($name) eq $name);
|
||||
last if (&new_users_name_valid($name));
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
@ -334,7 +334,7 @@ sub new_users_name_valid {
|
||||
} elsif ($username{$name}) {
|
||||
warn "Username ``$name'' already exists!\a\n"; return 0;
|
||||
}
|
||||
return $name;
|
||||
return 1;
|
||||
}
|
||||
|
||||
# return full name
|
||||
|
Loading…
Reference in New Issue
Block a user