PHP Class Kohana_Auth_ORM, php-framework-benchmarks

[!!] this Auth driver does not support roles nor autologin.
Author: Kohana Team
Inheritance: extends Auth
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Méthodes publiques

Méthode Description
auto_login ( ) : mixed 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, $mark_session_as_forced = FALSE ) : boolean Forces a user to be logged in, without specifying a password.
get_user ( ) : mixed Gets the currently logged in user from the session (with auto_login check).
logged_in ( $role = NULL, $all_required = TRUE ) : boolean Checks if a session is active.
logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean Log a user out and remove any autologin cookies.
password ( $user ) : string Get the stored password for a username.
remember ( Model_User $user = NULL ) : boolean Remember user (create token and save it in cookie)

Méthodes protégées

Méthode Description
_login ( $user, $password, $remember ) : boolean Logs a user in.
complete_login ( $user ) : void Complete the login for a user by incrementing the logins and setting session data: user_id, username, roles.

Method Details

_login() protected méthode

Logs a user in.
protected _login ( $user, $password, $remember ) : boolean
Résultat boolean

auto_login() public méthode

Logs a user in, based on the authautologin cookie.
public auto_login ( ) : mixed
Résultat mixed

check_password() public méthode

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

complete_login() protected méthode

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

force_login() public méthode

Forces a user to be logged in, without specifying a password.
public force_login ( $user, $mark_session_as_forced = FALSE ) : boolean
Résultat boolean

get_user() public méthode

Returns FALSE if no user is currently logged in.
public get_user ( ) : mixed
Résultat mixed

logged_in() public méthode

Checks if a session is active.
public logged_in ( $role = NULL, $all_required = TRUE ) : boolean
Résultat boolean

logout() public méthode

Log a user out and remove any autologin cookies.
public logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean
Résultat boolean

password() public méthode

Get the stored password for a username.
public password ( $user ) : string
Résultat string

remember() public méthode

Remember user (create token and save it in cookie)
public remember ( Model_User $user = NULL ) : boolean
$user Model_User
Résultat boolean