function _drupalgap_resource_user_login in DrupalGap 7
Same name and namespace in other branches
- 6 drupalgap.resource.inc \_drupalgap_resource_user_login()
- 7.2 drupalgap.resource.inc \_drupalgap_resource_user_login()
Performs a user login service resource call and bundles up the drupalgap system connect resource results as well.
Parameters
$username: String The Drupal user name.
$password: String The Drupal user password.
Return value
array Array with the user login result and drupalgap system connect result.
1 string reference to '_drupalgap_resource_user_login'
- drupalgap_services_resources in ./
drupalgap.services.inc - Defines function signatures for resources available to services.
File
- ./
drupalgap.resource.inc, line 129 - This file implements the DrupalGap service resource call back functions.
Code
function _drupalgap_resource_user_login($username, $password) {
$results = array();
// Make a call to the user login resource.
module_load_include('inc', 'services', 'resources/user_resource');
$results['_user_resource_login'] = _user_resource_login($username, $password);
// If the user login was successful, make a call to the drupalgap system
// connect resource.
if ($results['_user_resource_login']) {
$results['drupalgap_system_connect'] = _drupalgap_resource_system_connect();
}
return $results;
}