- $this->user = User::staticGet('id', $profile->id);
- }
-
- function avatar()
- {
- $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
- if (empty($avatar)) {
- $avatar = $this->profile->getAvatar(73);
+ try {
+ $this->user = $this->profile->getUser();
+ } catch (NoSuchUserException $e) {
+ // The profile presented is non-local
+ assert(!$this->profile->isLocal());