AUTH_NO_SUCH_USER
USER_PASSWORD_MIN_LENGTH
- USER_PASSWORD_MAX_LENGTH
LOGIN_OPTIONAL
LOGIN_NORMAL
use constant AUTH_DISABLED => 4;
use constant AUTH_NO_SUCH_USER => 5;
-# The minimum and maximum lengths a password must have.
+# The minimum length a password must have.
use constant USER_PASSWORD_MIN_LENGTH => 3;
-use constant USER_PASSWORD_MAX_LENGTH => 16;
use constant LOGIN_OPTIONAL => 0;
use constant LOGIN_NORMAL => 1;
if (length($password) < USER_PASSWORD_MIN_LENGTH) {
ThrowUserError('password_too_short');
- } elsif (length($password) > USER_PASSWORD_MAX_LENGTH) {
- ThrowUserError('password_too_long');
} elsif ((defined $matchpassword) && ($password ne $matchpassword)) {
ThrowUserError('passwords_dont_match');
}
account_creation_disabled => 501,
account_creation_restricted => 501,
password_too_short => 502,
- password_too_long => 503,
invalid_username => 504,
# This is from strict_isolation, but it also basically means
# "invalid user."
[% title = "Passwords Don't Match" %]
The two passwords you entered did not match.
- [% ELSIF error == "password_too_long" %]
- [% title = "Password Too Long" %]
- The password must be no more than
- [%+ constants.USER_PASSWORD_MAX_LENGTH FILTER html %] characters long.
-
[% ELSIF error == "password_too_short" %]
[% title = "Password Too Short" %]
The password must be at least