You are here

function secure_permissions_drush_rebuild in Secure Permissions 6

Same name and namespace in other branches
  1. 7.2 secure_permissions.drush.inc \secure_permissions_drush_rebuild()
  2. 7 secure_permissions.drush.inc \secure_permissions_drush_rebuild()

Callback function for drush rebuild-perms.

Calls the default rebuild function and also records the event in the system logs for drush and Drupal.

1 string reference to 'secure_permissions_drush_rebuild'
secure_permissions_drush_command in includes/secure_permissions.drush.inc
Implementation of hook_drush_command().

File

includes/secure_permissions.drush.inc, line 56
Drush commands for Secure Permissions.

Code

function secure_permissions_drush_rebuild() {
  $active = variable_get('secure_permissions_active', 0);
  if ($active) {
    secure_permissions_rebuild();
    _secure_permissions_message_drush('Roles and permissions rebuilt.', array(), 'success');
  }
  else {
    _secure_permissions_message_drush('Could not rebuild roles and permissions because Secure Permissions is not active. Use "drush sec-perms on" to activate the module from the command line.', array(), 'error');
  }
}