function masquerade_drush_drush_command in Masquerade Extras 7.2
Same name and namespace in other branches
- 6.2 masquerade_drush/masquerade_drush.drush.inc \masquerade_drush_drush_command()
Implements hook_drush_command().
Specifies our custom commands.
See also
hook_drush_command()
File
- masquerade_drush/
masquerade_drush.drush.inc, line 14 - Provides some drush commands for masquerade.
Code
function masquerade_drush_drush_command() {
$items = array();
$items['masquerade'] = array(
'description' => 'Manipulates masquerades.',
'arguments' => array(
'command' => 'The masquerade command to execute.',
'account' => 'The user account to execute as.',
'target' => 'The user account to pretend to be.',
),
'options' => array(),
'aliases' => array(
'msq',
),
'examples' => array(
'drush masquerade [list|show]' => 'Lists the active masquerades in the site.',
'drush masquerade [terminate|end|stop|term] <source:username>' => 'Terminates any active masquerades for username|user ID|email address',
'drush masquerade [start|begin] <source:username> <target:username>' => 'Initializes a masquerade for <username|user ID|email address>.' . "\n" . 'On the next page, they will become the "target" account.',
),
'bootstrap' => DRUPAL_BOOTSTRAP_FULL,
);
$items['sessions'] = array(
'description' => 'Manipulates user sessions.',
'arguments' => array(
'command' => 'The command to execute.',
'account' => 'The user account to manipulate.',
),
'examples' => array(
'drush sessions [list]' => 'Lists all users logged in to the site.',
'drush sessions <user>' => 'Lists any sessions belonging to <user>.',
'drush sessions terminate <user>' => 'Ends the session for <user>.',
),
'aliases' => array(
'sess',
),
'bootstrap' => DRUPAL_BOOTSTRAP_FULL,
);
return $items;
}