PHP Class LoginController, huge

Inheritance: extends Controller
Afficher le fichier Open project: panique/huge Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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 méthode

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

login() public méthode

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

loginWithCookie() public méthode

Login with cookie
public loginWithCookie ( )

logout() public méthode

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

requestPasswordReset() public méthode

Show the request-password-reset page

requestPasswordReset_action() public méthode

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

setNewPassword() public méthode

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 méthode

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