From 3300e7bf91f6970ed3810a4d794dd78e830cd518 Mon Sep 17 00:00:00 2001 From: hecht Date: Wed, 4 Jan 2012 21:00:33 +0000 Subject: [PATCH] made a lock to prevent from people logging in to early --- ag/include/config.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ag/include/config.inc.php b/ag/include/config.inc.php index d4860e5..5b0cb29 100644 --- a/ag/include/config.inc.php +++ b/ag/include/config.inc.php @@ -41,14 +41,17 @@ include_once (ROOT_PATH . '/include/usergroup.inc.php'); $name = validateName($_COOKIE['name']); $passwort = validateString($_COOKIE['passwort']); -$usergroups = array(); +$usergroups = getUserGroups($name); + +if(!isUserInGroup($usergroups, ADMIN) && time() < mktime(18, 0, 0, 1, 6, 2012)) { + $passwort = null; +} if(!checkCookiePassword($name, $passwort)){ $POLOE = 1; $user_ida = array(); } else { $user_ida = mysql_fetch_assoc(mysql_query("SELECT * FROM user WHERE nickname='$name' LIMIT 1")); - $usergroups = getUserGroups($name); mysql_query('UPDATE user SET ip=\'' . $_SERVER['REMOTE_ADDR'] . '\', online_zeit=now() WHERE id='.$user_ida['id']); if ($online_rekord_1_0['anzahl'] < $online_r) { mysql_query('UPDATE online SET anzahl='.$online_r.', datum=now() WHERE id=1');