From f62719ba61e755cf40b178f6a3c940833df650e1 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 13 Nov 2008 04:56:12 +0000 Subject: Login is now working, but you can't logout --- modules/user/helpers/user.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/user/helpers/user.php') diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index aec058d6..aaf16299 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -69,6 +69,18 @@ class user { return user::_md5Salt($password); } + /** + * Perform the post authentication processing + * @param object $user the user object. + */ + public static function login($user) { + $user->login_count += 1; + $user->last_login = time(); + $user->save(); + + Session::instance()->set('user', $user); + } + /** * Create a hashed password using md5 plus salt. * @param string $password plaintext password -- cgit v1.2.3