Skip to content
Snippets Groups Projects
Commit 60c9c246 authored by Ere Maijala's avatar Ere Maijala Committed by Robert Lange
Browse files

Add convenience method to fetch user by ID.

parent 99e51360
No related merge requests found
......@@ -96,6 +96,18 @@ class User extends Gateway
return $row;
}
/**
* Retrieve a user object from the database based on ID.
*
* @param string $id ID.
*
* @return UserRow
*/
public function getById($id)
{
return $this->select(['id' => $id])->current();
}
/**
* Retrieve a user object from the database based on catalog ID.
*
......
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