PHP Class Auth_Jelly, jelly-auth

Author: Israel Canasa
Inheritance: extends Auth
Show file Open project: raeldc/jelly-auth

Public Methods

Method Description
_login ( $user, $password, $remember ) : boolean Logs a user in.
auto_login ( ) : boolean Logs a user in, based on the authautologin Cookie.
check_password ( string $password ) : boolean Compare password with original (hashed). Works for current (logged in) user
force_login ( $user ) : boolean Forces a user to be logged in, without specifying a password.
logged_in ( $role = NULL ) : boolean Checks if a session is active.
logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean Log a user out and remove any auto-login Cookies.
password ( $user ) : string Get the stored password for a username.

Protected Methods

Method Description
_get_object ( mixed $user ) : Model_User Convert a unique identifier string to a user object
complete_login ( $user ) : void Complete the login for a user by incrementing the logins and setting session data: user_id, username, roles

Method Details

_get_object() protected method

Convert a unique identifier string to a user object
protected _get_object ( mixed $user ) : Model_User
$user mixed
return Model_User

_login() public method

Logs a user in.
public _login ( $user, $password, $remember ) : boolean
return boolean

auto_login() public method

Logs a user in, based on the authautologin Cookie.
public auto_login ( ) : boolean
return boolean

check_password() public method

Compare password with original (hashed). Works for current (logged in) user
public check_password ( string $password ) : boolean
$password string
return boolean

complete_login() protected method

Complete the login for a user by incrementing the logins and setting session data: user_id, username, roles
protected complete_login ( $user ) : void
return void

force_login() public method

Forces a user to be logged in, without specifying a password.
public force_login ( $user ) : boolean
return boolean

logged_in() public method

Checks if a session is active.
public logged_in ( $role = NULL ) : boolean
return boolean

logout() public method

Log a user out and remove any auto-login Cookies.
public logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean
return boolean

password() public method

Get the stored password for a username.
public password ( $user ) : string
return string