You are here

function rules_action_load_user in Rules 6

Loads a user

Related topics

File

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

Code

function rules_action_load_user($settings) {
  $userarray = array(
    'name' => $settings['username'],
    'uid' => $settings['userid'],
  );
  return array(
    'user_loaded' => user_load(array_filter($userarray)),
  );
}