Commit 92aa9f42 authored by Dries's avatar Dries

- Patch #705310 by moshe weitzman: preserve watchdog entries during user cancel.

parent 3b5df3f7
......@@ -46,7 +46,7 @@ function dblog_overview() {
);
$query = db_select('watchdog', 'w')->extend('PagerDefault')->extend('TableSort');
$query->join('users', 'u', 'w.uid = u.uid');
$query->leftJoin('users', 'u', 'w.uid = u.uid');
$query
->fields('w', array('wid', 'uid', 'severity', 'type', 'timestamp', 'message', 'variables', 'link'))
->addField('u', 'name');
......
......@@ -100,26 +100,6 @@ function dblog_cron() {
}
}
/**
* Implements hook_user_cancel().
*/
function dblog_user_cancel($edit, $account, $method) {
switch ($method) {
case 'user_cancel_reassign':
db_update('watchdog')
->fields(array('uid' => 0))
->condition('uid', $account->uid)
->execute();
break;
case 'user_cancel_delete':
db_delete('watchdog')
->condition('uid', $account->uid)
->execute();
break;
}
}
function _dblog_get_message_types() {
$types = array();
......@@ -166,4 +146,3 @@ function dblog_form_system_logging_settings_alter(&$form, $form_state) {
);
$form['actions']['#weight'] = 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment