]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Easy comparison of two Profile objects
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Jul 2015 10:19:08 +0000 (12:19 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Jul 2015 10:19:55 +0000 (12:19 +0200)
classes/Profile.php
classes/User.php

index f78cd34e3647c1ca06fe747503ba9de743d6d002..f628965a7482a1be41b054e76fdf3def1e16651a 100644 (file)
@@ -1571,6 +1571,11 @@ class Profile extends Managed_DataObject
         return $this;
     }
 
+    public function sameAs(Profile $other)
+    {
+        return $this->getID() === $other->getID();
+    }
+
     /**
      * This will perform shortenLinks with the connected User object.
      *
index 9ae0cba80437bdedbc61ae1a4c3286d6190ad957..72510f162ca8deb1fde12378423b41a63d98716d 100644 (file)
@@ -132,6 +132,11 @@ class User extends Managed_DataObject
         return $this->_profile[$this->id];
     }
 
+    public function sameAs(Profile $other)
+    {
+        return $this->getProfile()->sameAs($other);
+    }
+
     public function getUri()
     {
         return $this->uri;