function _drupalgap_resource_user_register in DrupalGap 7.2
Same name and namespace in other branches
- 6 drupalgap.resource.inc \_drupalgap_resource_user_register()
- 7 drupalgap.resource.inc \_drupalgap_resource_user_register()
Performs a user registration service resource call and bundles up the drupalgap system connect resource results as well.
Parameters
$name: String The Drupal user name.
$mail: String The Drupal user e-mail address.
$pass: String The Drupal user password.
Return value
array Array with the user registration result and drupalgap system connect result.
File
- ./
drupalgap.resource.inc, line 182 - This file implements the DrupalGap service resource call back functions.
Code
function _drupalgap_resource_user_register($name, $mail, $pass) {
$results = array();
// Make a call to the user login resource.
module_load_include('inc', 'services', 'resources/user_resource');
$data = array(
'name' => $name,
'mail' => $mail,
'pass' => $pass,
);
$results['_user_resource_create'] = _user_resource_create($data);
// If the user registeration was successful, make a call to the drupalgap system
// connect resource.
if ($results['_user_resource_create']) {
$results['drupalgap_system_connect'] = _drupalgap_resource_system_connect();
}
return $results;
}