You are here

function user_rules_action_info in Rules 6

Implementation of hook_rules_action_info().

Related topics

File

rules/modules/user.rules.inc, line 141
rules integration for the user module

Code

function user_rules_action_info() {
  return array(
    'rules_action_user_addrole' => array(
      'label' => t('Add user role'),
      'arguments' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('User whose roles should be changed'),
        ),
      ),
      'module' => 'User',
    ),
    'rules_action_user_removerole' => array(
      'label' => t('Remove user role'),
      'arguments' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('User whose roles should be changed'),
        ),
      ),
      'module' => 'User',
    ),
    'rules_action_load_user' => array(
      'label' => t('Load a user account'),
      'new variables' => array(
        'user_loaded' => array(
          'type' => 'user',
          'label' => t('Loaded user'),
        ),
      ),
      'help' => t('Enter an id or a name of the user to load.'),
      'module' => 'User',
      'eval input' => array(
        'userid',
        'username',
      ),
    ),
    'rules_action_user_create' => array(
      'label' => t('Create a user'),
      'arguments' => array(
        'username' => array(
          'type' => 'string',
          'label' => t('User name'),
        ),
        'email' => array(
          'type' => 'string',
          'label' => t("User's E-mail"),
        ),
      ),
      'new variables' => array(
        'user_added' => array(
          'type' => 'user',
          'label' => t('New user'),
        ),
        'user_added_pw' => array(
          'type' => 'string',
          'label' => t("New user's password"),
        ),
      ),
      'module' => 'User',
    ),
  );
}