PHP Class Piwik\Plugins\Login\Controller

Inheritance: extends Piwik\Plugin\Controller
Afficher le fichier Open project: piwik/piwik Class Usage Examples

Protected Properties

Свойство Type Description
$auth Auth
$passwordResetter PasswordResetter
$sessionInitializer SessionInitializer

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

ajaxNoAccess() public méthode

Error message shown when an AJAX request has no access
public ajaxNoAccess ( string $errorMessage ) : string
$errorMessage string
Résultat string

authenticateAndRedirect() protected méthode

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
Résultat string failure message if unable to authenticate

clearSession() public static méthode

Clear session information
public static clearSession ( ) : void
Résultat void

configureView() protected méthode

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

confirmResetPassword() public méthode

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

getMessageExceptionNoAccess() protected méthode

getMessageExceptionNoAccessWhenInsecureConnectionMayBeUsed() protected méthode

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

index() public méthode

Default action
public index ( ) : string
Résultat string

login() public méthode

Login form
public login ( string $messageNoAccess = null, boolean $infoMessage = false ) : string
$messageNoAccess string Access error message
$infoMessage boolean
Résultat string

logme() public méthode

Form-less login
See also: how to use it on http://piwik.org/faq/how-to/#faq_30
public logme ( ) : void
Résultat void

logout() public méthode

Logout current user
public logout ( ) : void
Résultat void

resetPassword() public méthode

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

resetPasswordFirstStep() protected méthode

Saves password reset info and sends confirmation email.
protected resetPasswordFirstStep ( Piwik\QuickForm2 $form ) : array
$form Piwik\QuickForm2
Résultat array Error message(s) if an error occurs.

resetPasswordSuccess() public méthode

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.

Property Details

$auth protected_oe property

protected Auth,Piwik\Plugins\Login $auth
Résultat Auth

$passwordResetter protected_oe property

protected PasswordResetter,Piwik\Plugins\Login $passwordResetter
Résultat PasswordResetter

$sessionInitializer protected_oe property

protected SessionInitializer,Piwik\Plugins\Login $sessionInitializer
Résultat SessionInitializer