public function checkUserPassword(User $user, $password)
    {
        return $user->getPassword() === $this->encodeUserPassword($user, $password);
    }
public function checkUserPassword(User $user, $password)
    {
        return $user->getPassword() === $this->encodeUserPassword($user, $password);
    }
public function checkUserPassword ( User $ user , $ password ) { return $ user -> getPassword ( ) === $ this -> encodeUserPassword ( $ user , $ password ) ; }
Test whether a given plain text password matches a given User's encoded password.

@param User $user
@param string $password
@return bool
Test whether a given plain text password matches a given User s encoded password .