Correct PHPDoc for Member::currentUser. (Fixes #2750)

This commit is contained in:
Will Rossiter 2014-01-12 16:07:24 +13:00
parent 4ea62b44f9
commit 13bd4e96b1

View File

@ -636,14 +636,13 @@ class Member extends DataObject implements TemplateGlobalProvider {
/**
* Returns the current logged in user
*
* @return bool|Member Returns the member object of the current logged in
* user or FALSE.
* @return Member|null
*/
public static function currentUser() {
$id = Member::currentUserID();
if($id) {
return DataObject::get_one("Member", "\"Member\".\"ID\" = $id", true, 1);
return Member::get()->byId($id);
}
}