You are here

function cas_drush_command in CAS 6.3

Same name and namespace in other branches
  1. 7 cas.drush.inc \cas_drush_command()

Implements hook_drush_command().

File

./cas.drush.inc, line 11
Drush commands for CAS.

Code

function cas_drush_command() {
  $items = array();
  $items['cas-user-add-role'] = array(
    'callback' => 'cas_drush_user_add_role',
    'description' => 'Add a role to the specified CAS usernames.',
    'arguments' => array(
      'role' => 'The name of the role to add',
      'users' => '(optional) A comma delimited list of CAS user names.',
    ),
    'required-arguments' => 1,
    'examples' => array(
      'drush cas-user-add-role "power user" casuser1,casuser2' => 'Add the "power user" role to the accounts with CAS user names casuser1 and casuser2.',
    ),
  );
  $items['cas-user-create'] = array(
    'callback' => 'cas_drush_user_create',
    'description' => dt('Create a CAS user account with the specified CAS username.'),
    'arguments' => array(
      'cas_name' => 'The CAS username of the account to add',
    ),
    'required-arguments' => TRUE,
    'examples' => array(
      'drush cas-user-create newcasuser' => 'Create a new user with CAS username newcasuser',
    ),
  );
  return $items;
}