PHP Класс LoginController, huge

Наследование: extends Controller
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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)

Описание методов

__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).
public __construct ( )

index() публичный Метод

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

login() публичный Метод

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

loginWithCookie() публичный Метод

Login with cookie
public loginWithCookie ( )

logout() публичный Метод

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

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
public setNewPassword ( )

verifyPasswordReset() публичный Метод

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