src/user/models/LoginForm.php
public function confirmationValidate($attribute)
    {
        if (!$this->hasErrors()) {
            if ($this->user !== null) {
                $confirmationRequired = Yii::$app->settings->get('enableConfirmation', 'user') && !Yii::$app->settings->get('enableUnconfirmedLogin', 'user');
                if ($confirmationRequired && !$this->user->isEmailConfirmed) {
                    $this->addError($attribute, Yii::t('yuncms', 'You need to confirm your email address.'));
                }
                if ($this->user->isBlocked) {
                    $this->addError($attribute, Yii::t('yuncms', 'Your account has been blocked.'));
                }
            }
        }
    }
public function confirmationValidate($attribute)
    {
        if (!$this->hasErrors()) {
            if ($this->user !== null) {
                $confirmationRequired = Yii::$app->settings->get('enableConfirmation', 'user') && !Yii::$app->settings->get('enableUnconfirmedLogin', 'user');
                if ($confirmationRequired && !$this->user->isEmailConfirmed) {
                    $this->addError($attribute, Yii::t('yuncms', 'You need to confirm your email address.'));
                }
                if ($this->user->isBlocked) {
                    $this->addError($attribute, Yii::t('yuncms', 'Your account has been blocked.'));
                }
            }
        }
    }
public function confirmationValidate ( $ attribute ) { if ( ! $ this -> hasErrors ( ) ) { if ( $ this -> user !== null ) { $ confirmationRequired = Yii :: $ app -> settings -> get ( 'enableConfirmation' , 'user' ) && ! Yii :: $ app -> settings -> get ( 'enableUnconfirmedLogin' , 'user' ) ; if ( $ confirmationRequired && ! $ this -> user -> isEmailConfirmed ) { $ this -> addError ( $ attribute , Yii :: t ( 'yuncms' , 'You need to confirm your email address.' ) ) ; } if ( $ this -> user -> isBlocked ) { $ this -> addError ( $ attribute , Yii :: t ( 'yuncms' , 'Your account has been blocked.' ) ) ; } } } }
Validates the confirmation.
This method serves as the inline validation for password.

@param string $attribute the attribute currently being validated
Validates the confirmation . This method serves as the inline validation for password .