From 4c77988c78cd7bceb779e13bb2513504c4be4d4f Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Wed, 28 Jun 2017 08:59:07 -0400 Subject: [PATCH] Clarifying getPublicUser - minor code refactor to increase legibility per code review comment by @jpwhite4 --- classes/XDUser.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/classes/XDUser.php b/classes/XDUser.php index 8e10eb97af..36cb586e2d 100644 --- a/classes/XDUser.php +++ b/classes/XDUser.php @@ -391,12 +391,10 @@ public static function getUserByToken($token) */ public static function getPublicUser() { - if (null !== self::$_publicUser) { - return self::$_publicUser; - } else { + if (null === self::$_publicUser) { self::$_publicUser = self::getUserByUserName('Public User'); - return self::$_publicUser; } + return self::$_publicUser; }//getPublicUser // ---------------------------