PHP Class LoginController, huge

Inheritance: extends Controller
Exibir arquivo Open project: panique/huge Class Usage Examples

Public Methods

Method Description
__construct ( ) Construct this object by extending the basic Controller class. The parent::__construct thing is necessary to put checkAuthentication in here to make an entire controller only usable for logged-in users (for sure not needed in the LoginController).
index ( ) Index, default action (shows the login form), when you do login/index
login ( ) The login action, when you do login/login
loginWithCookie ( ) Login with cookie
logout ( ) The logout action Perform logout, redirect user to main-page
requestPasswordReset ( ) Show the request-password-reset page
requestPasswordReset_action ( ) The request-password-reset action POST-request after form submit
setNewPassword ( ) Set the new password Please note that this happens while the user is not logged in. The user identifies via the data provided by the password reset link from the email, automatically filled into the
fields. See verifyPasswordReset() for more. Then (regardless of result) route user to index page (user will get success/error via feedback message) POST request ! TODO this is an _action
verifyPasswordReset ( string $user_name, string $verification_code ) Verify the verification token of that user (to show the user the password editing view or not)

Method Details

__construct() public method

Construct this object by extending the basic Controller class. The parent::__construct thing is necessary to put checkAuthentication in here to make an entire controller only usable for logged-in users (for sure not needed in the LoginController).
public __construct ( )

index() public method

Index, default action (shows the login form), when you do login/index
public index ( )

login() public method

The login action, when you do login/login
public login ( )

loginWithCookie() public method

Login with cookie
public loginWithCookie ( )

logout() public method

The logout action Perform logout, redirect user to main-page
public logout ( )

requestPasswordReset() public method

Show the request-password-reset page

requestPasswordReset_action() public method

The request-password-reset action POST-request after form submit

setNewPassword() public method

Set the new password Please note that this happens while the user is not logged in. The user identifies via the data provided by the password reset link from the email, automatically filled into the fields. See verifyPasswordReset() for more. Then (regardless of result) route user to index page (user will get success/error via feedback message) POST request ! TODO this is an _action
public setNewPassword ( )

verifyPasswordReset() public method

Verify the verification token of that user (to show the user the password editing view or not)
public verifyPasswordReset ( string $user_name, string $verification_code )
$user_name string username
$verification_code string password reset verification token