PHP 클래스 Ezuser

This model represents user data. It can be used for retriving user data and validate agains the login.
저자: Roni Kumar Saha ([email protected])
상속: extends CI_Model
파일 보기 프로젝트 열기: xiidea/ezrbac

공개 메소드들

메소드 설명
__construct ( ) constructor function
create ( $data = [] )
generate_password ( $salt )
getUserID ( $user )
get_user_by_email ( $email ) : object Get user record by email
get_user_by_id ( $user_id ) : object Get user record by user_id
get_user_meta ( $user_id )
on_duplicate_update ( $table, null $data = NULL, null $update = NULL ) : boolean
requestPassword ( $user_id ) : string Reset user password, create reset request key and return it
set_new_password ( $npass, $email ) Save new password after hashing that
update ( $data = [] )
update_login_info ( $user_id ) : void Update user login info, such as IP-address or login time, and clear previously generated (but not activated) passwords.
update_user_meta ( $user_id, $data )

보호된 메소드들

메소드 설명
generateSalt ( ) : string Generates a salt that can be used to generate a password hash.

비공개 메소드들

메소드 설명
_duplicate_insert_sql ( $table, $values, null $update = NULL ) : string
_f ( $f )
parseData ( $data )
validate_schema ( )

메소드 상세

__construct() 공개 메소드

constructor function
public __construct ( )

create() 공개 메소드

public create ( $data = [] )

generateSalt() 보호된 메소드

Generates a salt that can be used to generate a password hash.
protected generateSalt ( ) : string
리턴 string the salt

generate_password() 공개 메소드

public generate_password ( $salt )

getUserID() 공개 메소드

public getUserID ( $user )

get_user_by_email() 공개 메소드

Get user record by email
public get_user_by_email ( $email ) : object
리턴 object

get_user_by_id() 공개 메소드

Get user record by user_id
public get_user_by_id ( $user_id ) : object
리턴 object

get_user_meta() 공개 메소드

public get_user_meta ( $user_id )

on_duplicate_update() 공개 메소드

public on_duplicate_update ( $table, null $data = NULL, null $update = NULL ) : boolean
$table
$data null
$update null
리턴 boolean

requestPassword() 공개 메소드

Reset user password, create reset request key and return it
public requestPassword ( $user_id ) : string
$user_id
리턴 string

set_new_password() 공개 메소드

Save new password after hashing that
public set_new_password ( $npass, $email )
$npass
$email

update() 공개 메소드

public update ( $data = [] )

update_login_info() 공개 메소드

Update user login info, such as IP-address or login time, and clear previously generated (but not activated) passwords.
public update_login_info ( $user_id ) : void
리턴 void

update_user_meta() 공개 메소드

public update_user_meta ( $user_id, $data )