blogapi_blogger_get_user_info

Definition

blogapi_blogger_get_user_info($appkey, $username, $password)
modules/blogapi/blogapi.module, line 159

Description

Blogging API callback. Returns profile information about a user.

Code

<?php
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);
  }
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.