Easy comparison of two Profile objects

This commit is contained in:
Mikael Nordfeldth 2015-07-10 12:19:08 +02:00
parent e567406c9f
commit f9d82a6ac5
2 changed files with 10 additions and 0 deletions

View 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.
*

View 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;