public function validatePassword($attribute, $params)
    {
      if ($this->user === null || !Password::validate($this->password, $this->user->password_hash))
        $this->addError($attribute, Yii::t('user', 'Invalid login or password'));
    }
public function validatePassword($attribute, $params)
    {
      if ($this->user === null || !Password::validate($this->password, $this->user->password_hash))
        $this->addError($attribute, Yii::t('user', 'Invalid login or password'));
    }
public function validatePassword ( $ attribute , $ params ) { if ( $ this -> user === null || ! Password :: validate ( $ this -> password , $ this -> user -> password_hash ) ) $ this -> addError ( $ attribute , Yii :: t ( 'user' , 'Invalid login or password' ) ) ; }
Validates if the hash of the given password is identical to the saved hash in the database.
It will always succeed if the module is in DEBUG mode.

@return void
Validates if the hash of the given password is identical to the saved hash in the database . It will always succeed if the module is in DEBUG mode .