Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web: when delete a user, delete team_admin entries for that user. #5377

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions html/inc/delete_account.inc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function wipe_account($user) {
BoincHostAppVersion::delete_for_user($user->id);
BoincHost::delete_for_user($user->id);
BoincConsent::delete_for_user($user->id);
BoincTeamAdmin::delete("userid=$user->id");

// final action
delete_user($user); //from user_util.inc
Expand Down
1 change: 1 addition & 0 deletions html/inc/forum_email.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function mail_report_list($forum, $subject, $body, $must_send=false) {
$admins = BoincTeamAdmin::enum("teamid=$team->id");
foreach ($admins as $admin) {
$u = BoincUser::lookup_id($admin->userid);
if (!$u) continue;
$success &= send_email($u, $subject, $body);
}
break;
Expand Down
1 change: 1 addition & 0 deletions html/inc/team.inc
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ function admin_list($teamid) {
$admins = BoincTeamAdmin::enum("teamid=$teamid");
foreach ($admins as $admin) {
$user = BoincUser::lookup_id($admin->userid);
if (!$user) continue;
$u[] = $user;
}
return $u;
Expand Down
1 change: 1 addition & 0 deletions html/user/team_admins.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

function show_admin($user, $admin) {
$admin_user = BoincUser::lookup_id($admin->userid);
if (!$admin_user) return;
$tokens = url_tokens($user->authenticator);
$date = date_str($admin->create_time);
echo "<tr>
Expand Down
Loading