X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FAuth.class.php;h=ecb48340ba5a35ca81eb3ee0e97429e1bd987d5d;hb=817c14c6c2098d85ef912fb95898c857bf533b4f;hp=2c3c657da1ddbd822c2ecee0bd775b27dc2a044c;hpb=c46106d305d91e93fb63c0d601a5a006a02bb63a;p=timetracker.git diff --git a/WEB-INF/lib/Auth.class.php b/WEB-INF/lib/Auth.class.php index 2c3c657d..ecb48340 100644 --- a/WEB-INF/lib/Auth.class.php +++ b/WEB-INF/lib/Auth.class.php @@ -36,7 +36,8 @@ class Auth { // die ("Your browser's cookie functionality is turned off. Please turn it on."); // } - $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display. + global $smarty; + $smarty->assign('authenticated', true); // Used in header.tpl for menu display. return true; } session_write_close(); @@ -63,7 +64,7 @@ class Auth { function doLogin($login, $password) { $auth = $this->authenticate($login, $password); - if (defined('AUTH_DEBUG') && isTrue(AUTH_DEBUG)) { + if (isTrue('DEBUG')) { echo '
'; var_dump($auth); echo '
'; } @@ -76,13 +77,13 @@ class Auth { $sql = "SELECT id FROM tt_users WHERE login = ".$mdb2->quote($login)." AND status = 1"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) { - if (defined('AUTH_DEBUG') && isTrue(AUTH_DEBUG)) + if (isTrue('DEBUG')) echo 'db error!
'; return false; } $val = $res->fetchRow(); if (!$val['id']) { - if (defined('AUTH_DEBUG') && isTrue(AUTH_DEBUG)) + if (isTrue('DEBUG')) echo 'login "'.$login.'" does not exist in Time Tracker database.
'; return false; }