PHP Class Ezlogin

Author: Roni Kumar Saha ([email protected])
Datei anzeigen Open project: xiidea/ezrbac

Public Methods

Method Description
__construct ( )
auto_login ( ) : boolean Automatic login user form cookie value return false if no valid cookie information found and auto login faild
getError ( )
login ( ) handle login
logout ( ) : void Logout user from the site
recover_password ( ) Recover Password Function This function called when the password recovery form submited
register_session ( $user, $remember = FALSE, $cookie = FALSE )
resetPassword ( array $param = [] ) : boolean validate and reset the password

Protected Methods

Method Description
send_email ( $option ) : mixed

Private Methods

Method Description
create_autologin ( $user_id ) : boolean Save data for user's autologin
delete_autologin ( ) : void Clear user's autologin data
end_now ( ) terminate the execution within the script! we will be stop here and further execution will be stopped I have not found anything to detect the exit , so doing it manually!! Hope the piece of code will not be necessary when i figure it out!!!
get_view_ref ( $view ) : string Return the template file. If override file available, return that template
load_view ( $view, $data, boolean $return = false ) : mixed Proxy for the load->view() to enable template override
process_login ( ) : boolean validate and process the login
process_recovery ( $user ) : boolean validate and process the password recovery
validateRequestHash ( $user, string $key = "" ) : boolean
validation_rule ( integer $index ) : array
view_login_form ( ) Display the login form. if there is any error also show it
view_password_reset_form ( ) Display the reset password form. if there is any error also show it
view_password_reset_message ( ) Display the reset password form. if there is any error also show it

Method Details

__construct() public method

public __construct ( )

auto_login() public method

Automatic login user form cookie value return false if no valid cookie information found and auto login faild
public auto_login ( ) : boolean
return boolean

getError() public method

public getError ( )

login() public method

handle login
public login ( )

logout() public method

Logout user from the site
public logout ( ) : void
return void

recover_password() public method

Recover Password Function This function called when the password recovery form submited
public recover_password ( )

register_session() public method

public register_session ( $user, $remember = FALSE, $cookie = FALSE )

resetPassword() public method

validate and reset the password
public resetPassword ( array $param = [] ) : boolean
$param array
return boolean

send_email() protected method

protected send_email ( $option ) : mixed
$option
return mixed