PHP Класс Piwik\Plugins\Login\Controller

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

Защищенные свойства (Protected)

Свойство Тип Описание
$auth Auth
$passwordResetter PasswordResetter
$sessionInitializer SessionInitializer

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

Метод Описание
__construct ( PasswordResetter $passwordResetter = null, AuthInterface $auth = null, $sessionInitializer = null ) Constructor.
ajaxNoAccess ( string $errorMessage ) : string Error message shown when an AJAX request has no access
clearSession ( ) : void Clear session information
confirmResetPassword ( ) Password reset confirmation action. Finishes the password reset process.
index ( ) : string Default action
login ( string $messageNoAccess = null, boolean $infoMessage = false ) : string Login form
logme ( ) : void Form-less login
logout ( ) : void Logout current user
resetPassword ( ) Reset password action. Stores new password as hash and sends email to confirm use.
resetPasswordSuccess ( ) The action used after a password is successfully reset. Displays the login screen with an extra message. A separate action is used instead of returning the HTML in confirmResetPassword so the resetToken won't be in the URL.

Защищенные методы

Метод Описание
authenticateAndRedirect ( string $login, string $password, boolean $rememberMe, string $urlToRedirect = false, boolean $passwordHashed = false ) : string Authenticate user and password. Redirect if successful.
configureView ( View $view ) Configure common view properties
getMessageExceptionNoAccess ( )
getMessageExceptionNoAccessWhenInsecureConnectionMayBeUsed ( ) : string The Session cookie is set to a secure cookie, when SSL is mis-configured, it can cause the PHP session cookie ID to change on each page view.
resetPasswordFirstStep ( Piwik\QuickForm2 $form ) : array Saves password reset info and sends confirmation email.

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

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

Constructor.
public __construct ( PasswordResetter $passwordResetter = null, AuthInterface $auth = null, $sessionInitializer = null )
$passwordResetter PasswordResetter
$auth AuthInterface

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

Error message shown when an AJAX request has no access
public ajaxNoAccess ( string $errorMessage ) : string
$errorMessage string
Результат string

authenticateAndRedirect() защищенный Метод

Authenticate user and password. Redirect if successful.
protected authenticateAndRedirect ( string $login, string $password, boolean $rememberMe, string $urlToRedirect = false, boolean $passwordHashed = false ) : string
$login string user name
$password string plain-text or hashed password
$rememberMe boolean Remember me?
$urlToRedirect string URL to redirect to, if successfully authenticated
$passwordHashed boolean indicates if $password is hashed
Результат string failure message if unable to authenticate

clearSession() публичный статический Метод

Clear session information
public static clearSession ( ) : void
Результат void

configureView() защищенный Метод

Configure common view properties
protected configureView ( View $view )
$view Piwik\View

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

Users visit this action from a link supplied in an email.

getMessageExceptionNoAccess() защищенный Метод

getMessageExceptionNoAccessWhenInsecureConnectionMayBeUsed() защищенный Метод

Indicate to user how to solve this particular use case by forcing secure connections.

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

Default action
public index ( ) : string
Результат string

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

Login form
public login ( string $messageNoAccess = null, boolean $infoMessage = false ) : string
$messageNoAccess string Access error message
$infoMessage boolean
Результат string

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

Form-less login
См. также: how to use it on http://piwik.org/faq/how-to/#faq_30
public logme ( ) : void
Результат void

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

Logout current user
public logout ( ) : void
Результат void

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

Reset password action. Stores new password as hash and sends email to confirm use.
public resetPassword ( )

resetPasswordFirstStep() защищенный Метод

Saves password reset info and sends confirmation email.
protected resetPasswordFirstStep ( Piwik\QuickForm2 $form ) : array
$form Piwik\QuickForm2
Результат array Error message(s) if an error occurs.

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

The action used after a password is successfully reset. Displays the login screen with an extra message. A separate action is used instead of returning the HTML in confirmResetPassword so the resetToken won't be in the URL.

Описание свойств

$auth защищенное свойство

protected Auth,Piwik\Plugins\Login $auth
Результат Auth

$passwordResetter защищенное свойство

protected PasswordResetter,Piwik\Plugins\Login $passwordResetter
Результат PasswordResetter

$sessionInitializer защищенное свойство

protected SessionInitializer,Piwik\Plugins\Login $sessionInitializer
Результат SessionInitializer