From a62755182c500c7c819868538efc37564f4d86e9 Mon Sep 17 00:00:00 2001 From: Martin Lyth Date: Sat, 2 Jul 2016 15:45:42 -0400 Subject: [PATCH] Test user equality better in Profile->getUser() --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;