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:
yar 2002-01-02 15:49:49 +00:00
parent 2e8685abef
commit 556b4b94e1

View File

@ -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