diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2016-04-27 18:50:13 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2016-04-27 18:50:13 +0200 |
commit | 3891b63a1eb52076337885487f251a10580a4a85 (patch) | |
tree | db1463894b756a6bb5114644feeec704ec886eb5 /Bugzilla/Group.pm | |
parent | c44470a368465adfe329fcfc32492829a21878da (diff) | |
download | bugzilla-3891b63a1eb52076337885487f251a10580a4a85.tar.gz bugzilla-3891b63a1eb52076337885487f251a10580a4a85.tar.xz |
Bug 218917 - Allow the login name to be different from the email address
Original patch by Gervase Markham
r=gerv a=dkl
Diffstat (limited to 'Bugzilla/Group.pm')
-rw-r--r-- | Bugzilla/Group.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index 9ea851c20..61c085c0e 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -322,7 +322,7 @@ sub _rederive_regexp { my ($self) = @_; my $dbh = Bugzilla->dbh; - my $sth = $dbh->prepare("SELECT userid, login_name, group_id + my $sth = $dbh->prepare("SELECT userid, email, group_id FROM profiles LEFT JOIN user_group_map ON user_group_map.user_id = profiles.userid @@ -337,8 +337,8 @@ sub _rederive_regexp { AND grant_type = ? and isbless = 0"); $sth->execute($self->id, GRANT_REGEXP); my $regexp = $self->user_regexp; - while (my ($uid, $login, $present) = $sth->fetchrow_array) { - if ($regexp ne '' and $login =~ /$regexp/i) { + while (my ($uid, $email, $present) = $sth->fetchrow_array) { + if ($regexp ne '' and $email =~ /$regexp/i) { $sthadd->execute($uid, $self->id, GRANT_REGEXP) unless $present; } else { $sthdel->execute($uid, $self->id, GRANT_REGEXP) if $present; |