diff --git a/security/Member.php b/security/Member.php index 1896c28d3..cb16a8632 100644 --- a/security/Member.php +++ b/security/Member.php @@ -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); } }