summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-04 16:19:08 +0100
committermkanat%bugzilla.org <>2009-12-04 16:19:08 +0100
commitbcbb3ba91f5dc4f13fbb0a49f8a5e441d686b34d (patch)
treed73193952b0d45560514e080321ff289e657060f
parentd2ee5a822feb4528675d7d0763d231bb7ef9a3ad (diff)
downloadbugzilla-bcbb3ba91f5dc4f13fbb0a49f8a5e441d686b34d.tar.gz
bugzilla-bcbb3ba91f5dc4f13fbb0a49f8a5e441d686b34d.tar.xz
Bug 532911: Remove use of Bugzilla::User from Bugzilla::Install::DB (modules may not be used like that during Install::DB)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
-rw-r--r--Bugzilla/Install/DB.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 0ae909ecd..bada40dad 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -2817,13 +2817,13 @@ sub _move_data_nomail_into_db {
SET disable_mail = 1
WHERE userid = ?');
foreach my $user_to_check (keys %nomail) {
- my $uid;
- if ($uid = Bugzilla::User::login_to_id($user_to_check)) {
- my $user = new Bugzilla::User($uid);
- print "\tDisabling email for user ", $user->email, "\n";
- $query->execute($user->id);
- delete $nomail{$user->email};
- }
+ my $uid = $dbh->selectrow_array(
+ 'SELECT userid FROM profiles WHERE login_name = ?',
+ undef, $user_to_check);
+ next if !$uid;
+ print "\tDisabling email for user $user_to_check\n";
+ $query->execute($uid);
+ delete $nomail{$user_to_check};
}
# If there are any nomail entries remaining, move them to nomail.bad