models/LoginForm.php
/**
     * Validates the password.
     * This method serves as the inline validation for password.
     *
     * @param string $attribute the attribute currently being validated
     * @param array $params the additional name-value pairs given in the rule
     */
Validates the password.
This method serves as the inline validation for password.

@param string $attribute the attribute currently being validated
@param array $params the additional name-value pairs given in the rule
Validates the password . This method serves as the inline validation for password . @param string $attribute the attribute currently being validated @param array $params the additional name - value pairs given in the rule
public function validatePassword($attribute, $params)
    {
        if (!$this->hasErrors()) {
            $user = $this->getUser();
            if (!$user || !$user->validatePassword($this->password)) {
                $this->addError($attribute, 'Usuario o password incorrecto');
            } else if ($user->estado != "A")
                $this->addError($attribute, 'Usuario inactivo o no confirmado');
        }
    }
public function validatePassword ( $ attribute , $ params ) { if ( ! $ this -> hasErrors ( ) ) { $ user = $ this -> getUser ( ) ; if ( ! $ user || ! $ user -> validatePassword ( $ this -> password ) ) { $ this -> addError ( $ attribute , 'Usuario o password incorrecto' ) ; } else if ( $ user -> estado != " A " ) $ this -> addError ( $ attribute , 'Usuario inactivo o no confirmado' ) ; } }
Validates the password.
Validates the password .