* @param array $args Web and URL arguments
*
* @return boolean false if user doesn't exist
+ *
+ */
function prepare($args)
{
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.
*/
function getNotices($limit=0)
{
- $cur = common_current_user();
- $user = $this->user;
-
- if (!empty($cur) && $cur->id == $user->id) {
- $notice = $this->user->noticeInbox(0, $limit);
- } else {
- $notice = $this->user->noticesWithFriends(0, $limit);
- }
+ $stream = new InboxNoticeStream($this->user);
+ $notice = $stream->getNotices(0, $limit, null, null);
- $notice = $user->noticesWithFriends(0, $limit);
$notices = array();
while ($notice->fetch()) {
if (!$profile) {
return null;
}
- $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
- return $avatar ? $avatar->url : null;
+ return $profile->avatarUrl(AVATAR_PROFILE_SIZE);
}
}