X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FAuth.class.php;h=354d34ba27f6129d77b1081f73509854040160d2;hb=280d6ea0ee096843551d7734b23377ec06d42e81;hp=243eed567a82f50836c1d2f73cf2be67fed1560f;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git
diff --git a/WEB-INF/lib/Auth.class.php b/WEB-INF/lib/Auth.class.php
index 243eed56..354d34ba 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();
@@ -52,17 +53,17 @@ class Auth {
{
return false;
}
-
+
// isPasswordExternal - returns true if actual password is not stored in the internal DB.
function isPasswordExternal()
{
return false;
}
-
+
// doLogin - perfoms a login procedure.
function doLogin($login, $password) {
$auth = $this->authenticate($login, $password);
-
+
if (defined('AUTH_DEBUG') && isTrue(AUTH_DEBUG)) {
echo '
'; var_dump($auth); echo '
';
}
@@ -86,7 +87,7 @@ class Auth {
echo 'login "'.$login.'" does not exist in Time Tracker database.
';
return false;
}
-
+
$this->setAuth($val['id'], $login);
return true;
}
@@ -111,7 +112,7 @@ class Auth {
function getUserLogin() {
return $_SESSION['login'];
}
-
+
// getUserId - retrieves user ID from session.
function getUserId() {
if (isset($_SESSION['authenticated_user_id']))
@@ -132,4 +133,3 @@ class Auth {
}
}
}
-?>
\ No newline at end of file