diff options
author | wurblzap%gmail.com <> | 2005-12-14 05:20:12 +0100 |
---|---|---|
committer | wurblzap%gmail.com <> | 2005-12-14 05:20:12 +0100 |
commit | 5107efb51fdeac3b9167d010141cd4bb5482c10a (patch) | |
tree | e54482f5314bc287959b1131c495566c241dbc49 /editusers.cgi | |
parent | 758dc7bc0f2fdfb1c45b0aac032f3c3cb6d1d619 (diff) | |
download | bugzilla-5107efb51fdeac3b9167d010141cd4bb5482c10a.tar.gz bugzilla-5107efb51fdeac3b9167d010141cd4bb5482c10a.tar.xz |
Bug 319942: Preferences not deleted along with user accounts.
Patch by Marc Schumann <wurblzap@gmail.com>,
r=LpSolit, a=justdave
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-x | editusers.cgi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editusers.cgi b/editusers.cgi index e9b61b13d..bfc7eee14 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -436,6 +436,9 @@ if ($action eq 'search') { $vars->{'bugs_activity'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM bugs_activity WHERE who = ?', undef, $otherUserID); + $vars->{'email_setting'} = $dbh->selectrow_array( + 'SELECT COUNT(*) FROM email_setting WHERE user_id = ?', + undef, $otherUserID); $vars->{'flags'}{'requestee'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM flags WHERE requestee_id = ? AND is_active = 1', undef, $otherUserID); @@ -448,6 +451,9 @@ if ($action eq 'search') { $vars->{'namedqueries'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM namedqueries WHERE userid = ?', undef, $otherUserID); + $vars->{'profile_setting'} = $dbh->selectrow_array( + 'SELECT COUNT(*) FROM profile_setting WHERE user_id = ?', + undef, $otherUserID); $vars->{'profiles_activity'} = $dbh->selectrow_array( 'SELECT COUNT(*) FROM profiles_activity WHERE who = ? AND userid != ?', undef, ($otherUserID, $otherUserID)); @@ -499,6 +505,8 @@ if ($action eq 'search') { 'logincookies WRITE', 'profiles WRITE', 'profiles_activity WRITE', + 'email_setting WRITE', + 'profile_setting WRITE', 'groups READ', 'bug_group_map READ', 'user_group_map WRITE', @@ -568,8 +576,12 @@ if ($action eq 'search') { } # Simple deletions in referred tables. + $dbh->do('DELETE FROM email_setting WHERE user_id = ?', undef, + $otherUserID); $dbh->do('DELETE FROM logincookies WHERE userid = ?', undef, $otherUserID); $dbh->do('DELETE FROM namedqueries WHERE userid = ?', undef, $otherUserID); + $dbh->do('DELETE FROM profile_setting WHERE user_id = ?', undef, + $otherUserID); $dbh->do('DELETE FROM profiles_activity WHERE userid = ? OR who = ?', undef, ($otherUserID, $otherUserID)); $dbh->do('DELETE FROM tokens WHERE userid = ?', undef, $otherUserID); |