function blogapi_blogger_get_user_info in Drupal 6
Same name and namespace in other branches
- 4 modules/blogapi.module \blogapi_blogger_get_user_info()
- 5 modules/blogapi/blogapi.module \blogapi_blogger_get_user_info()
Blogging API callback. Returns profile information about a user.
1 string reference to 'blogapi_blogger_get_user_info'
- blogapi_xmlrpc in modules/
blogapi/ blogapi.module - Implementation of hook_xmlrpc().
File
- modules/
blogapi/ blogapi.module, line 159 - Enable users to post using applications that support XML-RPC blog APIs.
Code
function blogapi_blogger_get_user_info($appkey, $username, $password) {
$user = blogapi_validate_user($username, $password);
if ($user->uid) {
$name = explode(' ', $user->realname ? $user->realname : $user->name, 2);
return array(
'userid' => $user->uid,
'lastname' => $name[1],
'firstname' => $name[0],
'nickname' => $user->name,
'email' => $user->mail,
'url' => url('blog/' . $user->uid, array(
'absolute' => TRUE,
)),
);
}
else {
return blogapi_error($user);
}
}