add changes to account state

This commit is contained in:
2015-10-19 07:48:46 +02:00
parent b04cbda645
commit 9145f21371
50 changed files with 2139 additions and 27 deletions

View File

@@ -8,6 +8,7 @@ use common\models\User;
class UserUpdate extends User {
public $password_plain;
public $password_repeat;
public $selected_accounts = [];
/**
* @inheritdoc
@@ -21,9 +22,16 @@ class UserUpdate extends User {
['email' ,'unique' , 'targetClass' => User::className(), 'targetAttribute' => 'email'],
['username' ,'unique', 'targetClass' => User::className(), 'targetAttribute' => 'username'],
[['password_plain' ,'password_repeat'] ,'string','min' =>6 ],
[['password_repeat'] ,'validatePasswordRepeat' ]
[['password_repeat'] ,'validatePasswordRepeat' ],
['selected_accounts',function ($attribute, $params) {
if (!is_array($this->$attribute)) {
$this->addError($attribute, 'Invalid array');
}
}
]
];
}
/**
* @formatter:on
*/