| 1 |
<?php |
<?php |
| 2 |
// $Id: dblog.module,v 1.30 2008/10/30 09:16:01 dries Exp $ |
// $Id: dblog.module,v 1.31 2008/12/28 20:41:19 dries Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 101 |
} |
} |
| 102 |
|
|
| 103 |
/** |
/** |
| 104 |
* Implementation of hook_user_delete(). |
* Implementation of hook_user_cancel(). |
| 105 |
*/ |
*/ |
| 106 |
function dblog_user_delete(&$edit, &$user) { |
function dblog_user_cancel(&$edit, &$account, $method) { |
| 107 |
db_query('UPDATE {watchdog} SET uid = 0 WHERE uid = %d', $user->uid); |
switch ($method) { |
| 108 |
|
case 'user_cancel_reassign': |
| 109 |
|
db_update('watchdog')->fields(array('uid' => 0))->condition('uid', $account->uid)->execute(); |
| 110 |
|
break; |
| 111 |
|
|
| 112 |
|
case 'user_cancel_delete': |
| 113 |
|
db_delete('watchdog')->condition('uid', $account->uid)->execute(); |
| 114 |
|
break; |
| 115 |
|
} |
| 116 |
} |
} |
| 117 |
|
|
| 118 |
function _dblog_get_message_types() { |
function _dblog_get_message_types() { |