gglnx / auth
This package is abandoned and no longer maintained.
No replacement package was suggested.
Simple auth class for PHP 5.3+
1.0.3
2012-08-11 17:41 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2021-10-22 17:52:43 UTC
README
Simple auth class for PHP 5.3+ based on cookies. Also included a password hash class based on phpass (http://www.openwall.com/phpass/) 0.3.
Using Auth
Checking if a user is currently logged in
If the current session is valid you get the User model object as return value.
$user = Auth\Session::check(function($user, $md5) { $user = User::findOne()->is('username', $user)->select(); return array('username' => $user->username, 'password' => $user->password, 'object' => $user); });