}
elsif ($fail_code == AUTH_ERROR) {
if ($result->{user_error}) {
- ThrowUserError($result->{error}, $result->{details});
+ ThrowUserError($result->{user_error}, $result->{details});
}
else {
ThrowCodeError($result->{error}, $result->{details});
# Force the user to type a longer password if it's too short.
if (length($password) < USER_PASSWORD_MIN_LENGTH) {
- return { failure => AUTH_ERROR, error => 'password_current_too_short',
- user_error => 1, details => { locked_user => $user } };
+ return { failure => AUTH_ERROR, user_error => 'password_current_too_short',
+ details => { locked_user => $user } };
}
# The user's credentials are okay, so delete any outstanding
# Bugzilla/Error.pm)
$lineno++;
if ($line =~
-/^[^#]*(Throw(Code|User)Error|error\s+=>)\s*\(?\s*["'](.*?)['"]/) {
+/^[^#]*\b(Throw(Code|User)Error|(user_)?error\s+=>)\s*\(?\s*["'](.*?)['"]/) {
my $errtype;
# If it's a normal ThrowCode/UserError
if ($2) {
}
# If it's an AUTH_ERROR tag
else {
- $errtype = 'code';
+ $errtype = $3 ? 'user' : 'code';
}
- my $errtag = $3;
+ my $errtag = $4;
push @{$Errors{$errtype}{$errtag}{used_in}{$file}}, $lineno;
}
}