* @return boolean false if user doesn't exist
*
*/
- function prepare($args)
+ function prepare(array $args=array())
{
parent::prepare($args);
$nickname = $this->trimmed('nickname');
- $this->user = User::staticGet('nickname', $nickname);
+ $this->user = User::getKV('nickname', $nickname);
if (!$this->user) {
// TRANS: Client error when user not found for an rss related action.
$this->clientError(_('No such user.'));
- return false;
} else {
$this->notices = $this->getNotices($this->limit);
return true;
*/
function getNotices($limit=0)
{
- $stream = new InboxNoticeStream($this->user);
+ $stream = new InboxNoticeStream($this->user->getProfile());
$notice = $stream->getNotices(0, $limit, null, null);
$notices = array();
if (!$profile) {
return null;
}
- $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
- return $avatar ? $avatar->url : null;
+ return $profile->avatarUrl(AVATAR_PROFILE_SIZE);
}
}