function block_user_role_delete in Drupal 7
Same name and namespace in other branches
- 8 core/modules/block/block.module \block_user_role_delete()
- 9 core/modules/block/block.module \block_user_role_delete()
Implements hook_user_role_delete().
Removes deleted role from blocks that use it.
File
- modules/
block/ block.module, line 1053 - Controls the visual building blocks a page is constructed with.
Code
function block_user_role_delete($role) {
db_delete('block_role')
->condition('rid', $role->rid)
->execute();
}