@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if (!defined("DELETE_DELAY")) define("DELETE_DELAY", 2); |
43 | 43 | |
44 | 44 | function is_delete_account_token_valid($userid, $token) { |
45 | - if (!is_valid_token($userid, $token, TOKEN_TYPE_DELETE_ACCOUNT) ) { |
|
45 | + if (!is_valid_token($userid, $token, TOKEN_TYPE_DELETE_ACCOUNT)) { |
|
46 | 46 | sleep(LOGIN_FAIL_SLEEP_SEC); |
47 | 47 | return false; |
48 | 48 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | // |
127 | 127 | function is_over_but_not_validated($res) { |
128 | 128 | if ($res->server_state == RESULT_SERVER_STATE_OVER && $res->outcome == RESULT_OUTCOME_SUCCESS && |
129 | - ($res->validate_state == VALIDATE_STATE_INIT || $res->validate_state == VALIDATE_STATE_INCONCLUSIVE) ) { |
|
129 | + ($res->validate_state == VALIDATE_STATE_INIT || $res->validate_state == VALIDATE_STATE_INCONCLUSIVE)) { |
|
130 | 130 | return true; |
131 | 131 | } |
132 | 132 | return false; |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | // |
145 | 145 | function cancel_results_for_user($user) { |
146 | 146 | $ress = BoincResult::enum("userid = $user->id"); |
147 | - $cancel_clause="server_state=".RESULT_SERVER_STATE_OVER.", outcome=".RESULT_OUTCOME_CLIENT_DETACHED.", validate_state=".VALIDATE_STATE_INVALID; |
|
148 | - $set_id_clause="hostid=0, userid=0"; |
|
147 | + $cancel_clause = "server_state=".RESULT_SERVER_STATE_OVER.", outcome=".RESULT_OUTCOME_CLIENT_DETACHED.", validate_state=".VALIDATE_STATE_INVALID; |
|
148 | + $set_id_clause = "hostid=0, userid=0"; |
|
149 | 149 | foreach ($ress as $res) { |
150 | 150 | if (is_in_progress($res) || is_over_but_not_validated($res)) { |
151 | 151 | $res->update($cancel_clause.", ".$set_id_clause); |
@@ -168,12 +168,12 @@ discard block |
||
168 | 168 | |
169 | 169 | // delete remote submit user |
170 | 170 | // |
171 | - delete_remote_submit_user($user); // from submit_util.inc |
|
171 | + delete_remote_submit_user($user); // from submit_util.inc |
|
172 | 172 | |
173 | 173 | // remove user's team records |
174 | 174 | // |
175 | - user_erase_team_owner($user); // from team.inc |
|
176 | - user_quit_team($user); // from team.inc |
|
175 | + user_erase_team_owner($user); // from team.inc |
|
176 | + user_quit_team($user); // from team.inc |
|
177 | 177 | user_erase_team_delta($user); // from team.inc |
178 | 178 | |
179 | 179 | // Items that do not have logic elsewhere |
@@ -200,6 +200,6 @@ discard block |
||
200 | 200 | BoincTeamAdmin::delete("userid=$user->id"); |
201 | 201 | |
202 | 202 | // final action |
203 | - delete_user($user); //from user_util.inc |
|
203 | + delete_user($user); //from user_util.inc |
|
204 | 204 | return 0; |
205 | 205 | } |