summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Auth/Verify
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Auth/Verify')
-rw-r--r--Bugzilla/Auth/Verify/LDAP.pm10
-rw-r--r--Bugzilla/Auth/Verify/RADIUS.pm4
2 files changed, 7 insertions, 7 deletions
diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm
index cd2e64370..2ff38a217 100644
--- a/Bugzilla/Auth/Verify/LDAP.pm
+++ b/Bugzilla/Auth/Verify/LDAP.pm
@@ -99,23 +99,21 @@ sub check_credentials {
my @emails = $user_entry->get_value($mail_attr);
# Default to the first email address returned.
- $params->{bz_username} = $emails[0];
+ $params->{email} = $emails[0];
if (@emails > 1) {
# Cycle through the adresses and check if they're Bugzilla logins.
# Use the first one that returns a valid id.
foreach my $email (@emails) {
- if ( login_to_id($email) ) {
- $params->{bz_username} = $email;
+ if ( email_to_id($email) ) {
+ $params->{email} = $email;
last;
}
}
}
-
- } else {
- $params->{bz_username} = $username;
}
+ $params->{bz_username} = $username;
$params->{realname} ||= $user_entry->get_value("displayName");
$params->{realname} ||= $user_entry->get_value("cn");
diff --git a/Bugzilla/Auth/Verify/RADIUS.pm b/Bugzilla/Auth/Verify/RADIUS.pm
index 60be52a07..163058c54 100644
--- a/Bugzilla/Auth/Verify/RADIUS.pm
+++ b/Bugzilla/Auth/Verify/RADIUS.pm
@@ -46,8 +46,10 @@ sub check_credentials {
Bugzilla->params->{'RADIUS_NAS_IP'} || undef)
|| return { failure => AUTH_LOGINFAILED };
+ $params->{bz_username} = $username;
+
# Build the user account's e-mail address.
- $params->{bz_username} = $username . $address_suffix;
+ $params->{email} = $username . $address_suffix;
return $params;
}