From f6ceaa03052e6878afd53a4bbb7f4429849fe25a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 19 May 2014 15:30:59 +0200 Subject: OO style modules --- inc/user.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/user.inc.php b/inc/user.inc.php index b333c7e4..19d17753 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -25,6 +25,9 @@ class User public static function load() { + if (self::isLoggedIn()) { + return true; + } if (Session::load()) { $uid = Session::get('uid'); if ($uid === false || $uid < 1) self::logout(); @@ -50,7 +53,7 @@ class User public static function logout() { Session::delete(); - Header('Location: ?do=main&fromlogout'); + Header('Location: ?do=Main&fromlogout'); exit(0); } -- cgit v1.2.3-55-g7522