These are the module properties and their default values
/**
* @var string Alias for module
*/
public $alias = "@user";
/**
* @var bool If true, users are required to enter an email
*/
public $requireEmail = true;
/**
* @var bool If true, users are required to enter a username
*/
public $requireUsername = false;
/**
* @var bool If true, users can enter an email. This is automatically set to true if $requireEmail = true
*/
public $useEmail = true;
/**
* @var bool If true, users can enter a username. This is automatically set to true if $requireUsername = true
*/
public $useUsername = true;
/**
* @var bool If true, users can log in using their email
*/
public $loginEmail = true;
/**
* @var bool If true, users can log in using their username
*/
public $loginUsername = true;
/**
* @var int Login duration
*/
public $loginDuration = 2592000; // 1 month
/**
* @var array|string Url to redirect to after logging in
*/
public $loginRedirect = ["/user"];
/**
* @var array|string Url to redirect to after logging out
*/
public $logoutRedirect = ["/"];
/**
* @var bool If true, users will have to confirm their email address after registering (= email activation)
*/
public $emailConfirmation = true;
/**
* @var bool If true, users will have to confirm their email address after changing it on the account page
*/
public $emailChangeConfirmation = true;
/**
* @var string Time before userkeys expire (currently only used for password resets)
*/
public $resetKeyExpiration = "48 hours";
/**
* @var string|null View path. Leave as null to use default "@user/views"
*/
public $viewPath;
/**
* @var string Email view path
*/
public $emailViewPath = "@user/mails";
/**
* @var array Model classes, e.g., ["User" => "amnah\yii2\user\models\User"]
* Usage:
* $user = Yii::$app->getModule("user")->model("User", $config);
* (equivalent to)
* $user = new \amnah\yii2\user\models\User($config);
*
* The model classes here will be merged with/override the [[_getDefaultModelClasses()|default ones]]
*/
public $modelClasses = [];