/** * Валидация пароля */ public function validatePassword($attribute) { $this->_user = static::$_user; if (!$this->_user || !$this->_user->validatePassword($this->{$attribute})) { $this->addError('username', ''); $this->addError($attribute, Yii::t('users', 'INVALID_USERNAME_OR_PASSWORD')); } if ($this->_user && !$this->_user->status) { $this->addError($attribute, Yii::t('users', 'MUST_ACTIVATE_ACCOUNT')); } }