common/models/forms/Login.php
public function validatePassword( $attribute, $params ) {

		if( !$this->hasErrors() ) {

			$user = $this->getUser();

			if( $user && !$user->validatePassword( $this->password ) ) {

				$this->addError( $attribute, Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_LOGIN_FAILED ) );
			}
		}
	}
public function validatePassword( $attribute, $params ) {

		if( !$this->hasErrors() ) {

			$user = $this->getUser();

			if( $user && !$user->validatePassword( $this->password ) ) {

				$this->addError( $attribute, Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_LOGIN_FAILED ) );
			}
		}
	}
public function validatePassword ( $ attribute , $ params ) { if ( ! $ this -> hasErrors ( ) ) { $ user = $ this -> getUser ( ) ; if ( $ user && ! $ user -> validatePassword ( $ this -> password ) ) { $ this -> addError ( $ attribute , Yii :: $ app -> coreMessage -> getMessage ( CoreGlobal :: ERROR_LOGIN_FAILED ) ) ; } } }
Check whether the password provided by user is valid.

@param string $attribute
@param array $params
Check whether the password provided by user is valid .