Commit bcbb3ba9 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 532911: Remove use of Bugzilla::User from Bugzilla::Install::DB (modules may…

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
parent d2ee5a82
...@@ -2817,13 +2817,13 @@ sub _move_data_nomail_into_db { ...@@ -2817,13 +2817,13 @@ sub _move_data_nomail_into_db {
SET disable_mail = 1 SET disable_mail = 1
WHERE userid = ?'); WHERE userid = ?');
foreach my $user_to_check (keys %nomail) { foreach my $user_to_check (keys %nomail) {
my $uid; my $uid = $dbh->selectrow_array(
if ($uid = Bugzilla::User::login_to_id($user_to_check)) { 'SELECT userid FROM profiles WHERE login_name = ?',
my $user = new Bugzilla::User($uid); undef, $user_to_check);
print "\tDisabling email for user ", $user->email, "\n"; next if !$uid;
$query->execute($user->id); print "\tDisabling email for user $user_to_check\n";
delete $nomail{$user->email}; $query->execute($uid);
} delete $nomail{$user_to_check};
} }
# If there are any nomail entries remaining, move them to nomail.bad # If there are any nomail entries remaining, move them to nomail.bad
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment