mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Correct PHPDoc for Member::currentUser. (Fixes #2750)
This commit is contained in:
parent
4ea62b44f9
commit
13bd4e96b1
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user