diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-13 04:56:12 +0000 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-13 04:56:12 +0000 |
| commit | f62719ba61e755cf40b178f6a3c940833df650e1 (patch) | |
| tree | 52dc43588506e667210440ed2b8800a74e1a3955 /modules/user/helpers/user.php | |
| parent | c9b07ff99ee3f198a78b4bff46991bf22d99ad3d (diff) | |
Login is now working, but you can't logout
Diffstat (limited to 'modules/user/helpers/user.php')
| -rw-r--r-- | modules/user/helpers/user.php | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ -70,6 +70,18 @@ class user { } /** + * 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 * @param string $salt (optional) salt or hash containing salt (randomly generated if omitted) |
