You are here

function user_permissions_uninstall in User Permissions 7

Same name and namespace in other branches
  1. 8 user_permissions.install \user_permissions_uninstall()
  2. 5 user_permissions.install \user_permissions_uninstall()
  3. 6 user_permissions.install \user_permissions_uninstall()

Removes any roles created by this module.

File

./user_permissions.install, line 15

Code

function user_permissions_uninstall() {
  $roles = user_roles();
  foreach ($roles as $rid => $name) {
    if (preg_match('/^_user_role_\\d+$/', $name)) {
      user_role_delete($rid);
    }
  }
}