Commit d16a883e authored by mmn's avatar mmn

Allow lookup of User->getByUri (throws NoResultException)

parent b23cc746
......@@ -140,6 +140,16 @@ class User extends Managed_DataObject
return $this->uri;
}
static function getByUri($uri)
{
$user = new User();
$user->uri = $uri;
if (!$user->find(true)) {
throw new NoResultException($user);
}
return $user;
}
public function getNickname()
{
return $this->getProfile()->getNickname();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment