PHP 클래스 Users_auth, 68kb

Modified for our use from: http://www.bramme.net/2008/07/auth-library-for-codeigniter-tutorial/
파일 보기 프로젝트 열기: 68kb/68kb

공개 메소드들

메소드 설명
__construct ( ) ------------------------------------------------------------------------
ban_check ( ) : boolean Check if a user is banned
check_role ( $role = NULL ) : boolean Check a role
get_data ( $data ) : mixed Get an item for the user.
logged_in ( ) : boolean Check if a user is logged in
login ( $username = '', $password = '', $remember = 'n', $in_admin = FALSE ) : void Set the mode of the creation
logout ( ) Logout a user
redirect ( $in_admin = FALSE ) Redirect user to page requested

비공개 메소드들

메소드 설명
_check_cookie ( ) Check Cookie
_check_failed_login ( $username ) Check a failed login attempt
_create_session ( ) Create session data
_get_hash ( ) : void Create a unique hash
_set_cookie ( ) : void Save cookie login
_set_guest ( ) : array Set a user as a guest.

메소드 상세

__construct() 공개 메소드

------------------------------------------------------------------------
public __construct ( )

ban_check() 공개 메소드

This method returns TRUE if they are banned.
public ban_check ( ) : boolean
리턴 boolean

check_role() 공개 메소드

Check if a user can perform a specific action.
public check_role ( $role = NULL ) : boolean
리턴 boolean

get_data() 공개 메소드

Get an item for the user.
public get_data ( $data ) : mixed
리턴 mixed

logged_in() 공개 메소드

First check the session then the cookie.
public logged_in ( ) : boolean
리턴 boolean

login() 공개 메소드

Set the mode of the creation
public login ( $username = '', $password = '', $remember = 'n', $in_admin = FALSE ) : void
리턴 void

logout() 공개 메소드

Logout a user
public logout ( )

redirect() 공개 메소드

Redirect user to page requested
public redirect ( $in_admin = FALSE )