You are here

function user_permissions_uninstall in User Permissions 8

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

Removes any roles created by this module.

File

./user_permissions.install, line 26
Installation tasts for user_permissions.

Code

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