From: Martin Lyth Date: Sat, 2 Jul 2016 19:45:42 +0000 (-0400) Subject: Test user equality better in Profile->getUser() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a62755182c500c7c819868538efc37564f4d86e9;p=quix0rs-gnu-social.git Test user equality better in Profile->getUser() --- diff --git a/classes/Profile.php b/classes/Profile.php index a38ee9f499..ef3f5c1b2f 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -94,7 +94,7 @@ class Profile extends Managed_DataObject throw new NoSuchUserException(array('id'=>$this->id)); } $cur_user = common_current_user(); - if ($user->id === $cur_user->id) { + if (($cur_user instanceof User) && $cur_user->sameAS($this)) { $user = $cur_user; } $this->_user[$this->id] = $user;