Class dektrium\user\controllers\RegistrationController

Inheritancedektrium\user\controllers\RegistrationController » yii\web\Controller
Uses Traitsdektrium\user\traits\AjaxValidationTrait, dektrium\user\traits\EventTrait

RegistrationController is responsible for all registration process, which includes registration of a new account, resending confirmation tokens, email confirmation and registration via social networks.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() dektrium\user\controllers\RegistrationController
actionConfirm() Confirms user's account. If confirmation was successful logs the user and shows success message. Otherwise shows error message. dektrium\user\controllers\RegistrationController
actionConnect() Displays page where user can create new account that will be connected to social account. dektrium\user\controllers\RegistrationController
actionRegister() Displays the registration page. dektrium\user\controllers\RegistrationController
actionResend() Displays page where user can request new confirmation token. If resending was successful, displays message. dektrium\user\controllers\RegistrationController
behaviors() dektrium\user\controllers\RegistrationController

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
EVENT_AFTER_CONFIRM 'afterConfirm' Event is triggered before confirming user. Triggered with \dektrium\user\events\UserEvent. dektrium\user\controllers\RegistrationController
EVENT_AFTER_CONNECT 'afterConnect' Event is triggered after connecting user to social account. Triggered with \dektrium\user\events\UserEvent. dektrium\user\controllers\RegistrationController
EVENT_AFTER_REGISTER 'afterRegister' Event is triggered after successful registration. Triggered with \dektrium\user\events\FormEvent. dektrium\user\controllers\RegistrationController
EVENT_AFTER_RESEND 'afterResend' Event is triggered after successful resending of confirmation email. Triggered with \dektrium\user\events\FormEvent. dektrium\user\controllers\RegistrationController
EVENT_BEFORE_CONFIRM 'beforeConfirm' Event is triggered before confirming user. Triggered with \dektrium\user\events\UserEvent. dektrium\user\controllers\RegistrationController
EVENT_BEFORE_CONNECT 'beforeConnect' Event is triggered before connecting user to social account. Triggered with \dektrium\user\events\UserEvent. dektrium\user\controllers\RegistrationController
EVENT_BEFORE_REGISTER 'beforeRegister' Event is triggered after creating RegistrationForm class. Triggered with \dektrium\user\events\FormEvent. dektrium\user\controllers\RegistrationController
EVENT_BEFORE_RESEND 'beforeResend' Event is triggered after creating ResendForm class. Triggered with \dektrium\user\events\FormEvent. dektrium\user\controllers\RegistrationController

Property Details

$finder protected property
protected dektrium\user\Finder $finder null

Method Details

__construct() public method

public void __construct ( $id, $module, dektrium\user\Finder $finder, $config = [] )
$id string
$module \yii\base\Module
$finder dektrium\user\Finder
$config array
actionConfirm() public method

Confirms user's account. If confirmation was successful logs the user and shows success message. Otherwise shows error message.

public string actionConfirm ( $id, $code )
$id int
$code string
throws \yii\web\HttpException
actionConnect() public method

Displays page where user can create new account that will be connected to social account.

public string actionConnect ( $code )
$code string
throws \yii\web\NotFoundHttpException
actionRegister() public method

Displays the registration page.

After successful registration if enableConfirmation is enabled shows info message otherwise redirects to home page.

public string actionRegister ( )
throws \yii\web\HttpException
actionResend() public method

Displays page where user can request new confirmation token. If resending was successful, displays message.

public string actionResend ( )
throws \yii\web\HttpException
behaviors() public method

public void behaviors ( )