| 1 |
<?php |
<?php |
| 2 |
// $Id: statistics.module,v 1.291 2008/12/18 03:58:24 dries Exp $ |
// $Id: statistics.module,v 1.292 2008/12/26 14:23:38 dries Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 182 |
} |
} |
| 183 |
|
|
| 184 |
/** |
/** |
| 185 |
* Implementation of hook_user_delete(). |
* Implementation of hook_user_cancel(). |
| 186 |
*/ |
*/ |
| 187 |
function statistics_user_delete(&$edit, &$user, $category) { |
function statistics_user_cancel(&$edit, &$account, $method) { |
| 188 |
db_query('UPDATE {accesslog} SET uid = 0 WHERE uid = %d', $user->uid); |
switch ($method) { |
| 189 |
|
case 'user_cancel_reassign': |
| 190 |
|
db_update('accesslog')->fields(array('uid' => 0))->condition('uid', $account->uid)->execute(); |
| 191 |
|
break; |
| 192 |
|
|
| 193 |
|
case 'user_cancel_delete': |
| 194 |
|
db_delete('accesslog')->condition('uid', $account->uid)->execute(); |
| 195 |
|
break; |
| 196 |
|
} |
| 197 |
} |
} |
| 198 |
|
|
| 199 |
/** |
/** |