Class dektrium\user\models\RegistrationForm

Inheritancedektrium\user\models\RegistrationForm » yii\base\Model
Uses Traitsdektrium\user\traits\ModuleTrait

Registration form collects user input on registration process, validates it and creates new User model.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
loadAttributes() Loads attributes to the user model. You should override this method if you are going to add new fields to the registration form. You can read more in special guide. dektrium\user\models\RegistrationForm

Property Details

$email public property

User email address

public string $email null
$password public property

Password

public string $password null
$username public property

Username

public string $username null

Method Details

attributeLabels() public method

public void attributeLabels ( )
formName() public method

public void formName ( )
loadAttributes() protected method

Loads attributes to the user model. You should override this method if you are going to add new fields to the registration form. You can read more in special guide.

By default this method set all attributes of this model to the attributes of User model, so you should properly configure safe attributes of your User model.

protected void loadAttributes ( dektrium\user\models\User $user )
$user dektrium\user\models\User
register() public method

Registers a new user account. If registration was successful it will set flash message.

public bool register ( )
rules() public method

public void rules ( )