public static function ClientsServicesFlickr::getUser in Web Service Clients 6
Connects to Drupal Services and logs in the user provided in the config. Returns a session for the user. @todo needs error catching in case service is down
Return value
array
File
- backends/
clients_flickr/ clients_flickr.inc, line 60 - Defines Flickr services and calls
Class
Code
public static function getUser($connection) {
$session = self::connect($connection);
$userToken = self::getToken($connection, 'user.login');
$user = xmlrpc($connection->baseurl, 'user.login', $userToken['hash'], $userToken['domain'], $userToken['timestamp'], $userToken['nonce'], $session['sessid'], $connection->configuration['username'], $connection->configuration['password']);
if ($user === FALSE) {
return xmlrpc_error();
}
return $user;
}