From 3a7602effa90c05e8f9e4fbfd6db7d774e16beb1 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 1 Oct 2007 01:10:04 +0000 Subject: final fixes. --- .../protected/App_Code/UserManager.php | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'demos/time-tracker/protected/App_Code/UserManager.php') diff --git a/demos/time-tracker/protected/App_Code/UserManager.php b/demos/time-tracker/protected/App_Code/UserManager.php index b4a4ad68..66eecb95 100644 --- a/demos/time-tracker/protected/App_Code/UserManager.php +++ b/demos/time-tracker/protected/App_Code/UserManager.php @@ -27,7 +27,7 @@ class UserManager extends TModule implements IUserManager { return 'Guest'; } - + /** * Returns a user instance given the user name. * @param string user name, null if it is a guest. @@ -50,7 +50,7 @@ class UserManager extends TModule implements IUserManager return $user; } } - + /** * Validates if the username and password are correct. * @param string user name @@ -63,6 +63,28 @@ class UserManager extends TModule implements IUserManager $userDao = $daos->getDao('UserDao'); return $userDao->validateUser($username, $password); } + + /** + * Saves user auth data into a cookie. + * @param THttpCookie the cookie to receive the user auth data. + * @since 3.1.1 + */ + public function saveUserToCookie($cookie) + { + // do nothing since we don't support cookie-based auth in this example + } + + /** + * Returns a user instance according to auth data stored in a cookie. + * @param THttpCookie the cookie storing user authentication information + * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data. + * @since 3.1.1 + */ + public function getUserFromCookie($cookie) + { + // do nothing since we don't support cookie-based auth in this example + return null; + } } ?> \ No newline at end of file -- cgit v1.2.3