Skip to content

Commit

Permalink
Clarifying getPublicUser
Browse files Browse the repository at this point in the history
- minor code refactor to increase legibility per code review comment by
  @jpwhite4
  • Loading branch information
ryanrath committed Jun 28, 2017
1 parent 8113599 commit 4c77988
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions classes/XDUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

// ---------------------------
Expand Down

0 comments on commit 4c77988

Please sign in to comment.