add changes to account state
This commit is contained in:
@@ -8,6 +8,7 @@ class UserCreate extends User{
|
||||
|
||||
public $password_plain;
|
||||
public $password_repeat;
|
||||
public $selected_accounts = [];
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -16,11 +17,17 @@ class UserCreate extends User{
|
||||
{
|
||||
return [
|
||||
[['username','email','password_plain','password_repeat'], 'required' ],
|
||||
['selected_accounts',function ($attribute, $params) {
|
||||
if (!is_array($this->$attribute)) {
|
||||
$this->addError($attribute, 'Invalid array');
|
||||
}
|
||||
}
|
||||
],
|
||||
['email' ,'email' ],
|
||||
['email' ,'unique' ],
|
||||
['username' ,'unique' ],
|
||||
[['password_plain' ,'password_repeat'] ,'string','min' =>6 ],
|
||||
[['password_repeat'] ,'validatePasswordRepeat' ]
|
||||
[['password_repeat'] ,'validatePasswordRepeat' ],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user