function secure_permissions_drush_toggle_active in Secure Permissions 6
Same name and namespace in other branches
- 7.2 secure_permissions.drush.inc \secure_permissions_drush_toggle_active()
- 7 secure_permissions.drush.inc \secure_permissions_drush_toggle_active()
Callback function for drush sec-perms.
Currently activates/deactivates the Secure Permissions module. Is also a placeholder for general settings controls from the command line.
Parameters
$action: (string) so far 'on' means activate, 'off' means deactivate.
1 string reference to 'secure_permissions_drush_toggle_active'
- secure_permissions_drush_command in includes/
secure_permissions.drush.inc - Implementation of hook_drush_command().
File
- includes/
secure_permissions.drush.inc, line 76 - Drush commands for Secure Permissions.
Code
function secure_permissions_drush_toggle_active($action) {
if ($action == 'on') {
variable_set('secure_permissions_active', 1);
_secure_permissions_message_drush('Secure Permissions module has been activated.', array(), 'success');
}
elseif ($action == 'off') {
variable_set('secure_permissions_active', 0);
_secure_permissions_message_drush('Secure Permissions module has been deactivated.', array(), 'success');
}
else {
_secure_permissions_message_drush('Could not understand the response !active. Doing nothing.', array(
'!active' => $active,
), 'error');
}
}