function user_revision_user_delete in User Revision 7
Same name and namespace in other branches
- 7.2 user_revision.module \user_revision_user_delete()
Implements hook_user_delete().
File
- ./
user_revision.module, line 419 - Enables user revision.
Code
function user_revision_user_delete($account) {
$revisions = db_select('user_revision', 'ur')
->condition('ur.uid', $account->uid)
->fields('ur', array(
'vid',
))
->execute()
->fetchCol();
foreach ($revisions as $revision_id) {
$revision = user_revision_load($account->uid, $revision_id);
user_revision_delete($revision);
}
}