Example #1
0
 /**
  * Returns the currently logged in user via sessions.
  *
  * @static
  * @see User::withSession()
  * @return User
  */
 public static function getLoggedUser()
 {
     if (!self::$current_logged_user) {
         if (Walleye::getInstance()->isTesting()) {
             self::$current_logged_user = User::withId(Walleye::getInstance()->getTestingUserId());
         } else {
             self::$current_logged_user = User::withSession();
         }
     }
     return self::$current_logged_user;
 }
Example #2
0
 /**
  * Returns the currently logged in user via sessions.
  *
  * @static
  * @see User::withSession()
  * @return User
  */
 public static function getLoggedUser()
 {
     if (!self::$current_logged_user) {
         self::$current_logged_user = User::withSession();
     }
     return self::$current_logged_user;
 }