public function getUser()
{
if (!isset($this->_user[$this->id])) {
- $user = User::getKV('id', $this->id);
- if (!$user instanceof User) {
- throw new NoSuchUserException(array('id'=>$this->id));
- }
$cur_user = common_current_user();
if (($cur_user instanceof User) && $cur_user->sameAS($this)) {
$user = $cur_user;
+ } else {
+ $user = User::getKV('id', $this->id);
+ if (!$user instanceof User) {
+ throw new NoSuchUserException(array('id'=>$this->id));
+ }
}
$this->_user[$this->id] = $user;
}