You are here

function bakery_create_account in Bakery Single Sign-On System 7.3

Hookable local user account creation from SSO cookie properties.

Parameters

array Array of properties, often the SSO cookie array.:

Return value

User account object.

1 call to bakery_create_account()
_bakery_handle_sso in ./bakery.module
Authenticate from valid SSO cookie.

File

./bakery.module, line 830

Code

function bakery_create_account($data) {

  // @todo make hook
  $new_account = array(
    'name' => $data['name'],
    'pass' => user_password(),
    'mail' => $data['mail'],
    'status' => 1,
    'init' => _bakery_init_field($data['uid']),
  );
  $account = user_save(NULL, $new_account);
  return $account;
}