From 3891b63a1eb52076337885487f251a10580a4a85 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 27 Apr 2016 18:50:13 +0200 Subject: Bug 218917 - Allow the login name to be different from the email address Original patch by Gervase Markham r=gerv a=dkl --- Bugzilla/Group.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Group.pm') 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; -- cgit v1.2.3-24-g4f1b