function node_limit_user_delete in Node Limit 7
Same name and namespace in other branches
- 8 old/node_limit_user/node_limit_user.module \node_limit_user_delete()
Implements hook_user_delete().
Delete all limit rules related to the deleted user.
File
- node_limit_user/
node_limit_user.module, line 13 - Module to restrict the number of nodes by user.
Code
function node_limit_user_delete($account) {
$limits = db_select('node_limit_user', 'src')
->fields('src', array(
'lid',
))
->condition('uid', $account->uid)
->execute();
$lids = array();
foreach ($limits as $limit) {
$lids[] = $limit->lid;
}
node_limit_delete($lids);
}