Commit dd5107bc authored by Donal McMullan's avatar Donal McMullan
Browse files

Rename retrieve to find_by_id

parent 9e0d3caa
......@@ -92,12 +92,16 @@ class User {
/**
*
*/
public function retrieve($id) {
public function find_by_id($id) {
if (!is_numeric($id) || $id < 0) {
throw new InvalidArgumentException('parameter must be a positive integer to create a User object');
}
$user = get_record('usr', 'id', $id);
$user = get_record('usr', 'id', $id, '*, ' . db_format_tsfield('expiry') . ', ' . db_format_tsfield('lastlogin'). ', ' . db_format_tsfield('suspendedctime'));
if (false == $user) {
throw new AuthUnknownUserException("User with id \"$id\" is not known");
}
$this->populate($user);
return $this;
}
......@@ -410,4 +414,4 @@ class LiveUser extends User {
return $this;
}
}
?>
\ No newline at end of file
?>
Supports Markdown
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