You are here

public static function clients_connection_flickr::getUser in Web Service Clients 7

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 59
Defines Flickr services and calls

Class

clients_connection_flickr

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;
}