src/User/User.php
public function checkPassword($password)
    {
        $valid = static::$dispatcher->until(new CheckingPassword($this, $password));

        if ($valid !== null) {
            return $valid;
        }

        return static::$hasher->check($password, $this->password);
    }
public function checkPassword($password)
    {
        $valid = static::$dispatcher->until(new CheckingPassword($this, $password));

        if ($valid !== null) {
            return $valid;
        }

        return static::$hasher->check($password, $this->password);
    }
public function checkPassword ( $ password ) { $ valid = static :: $ dispatcher -> until ( new CheckingPassword ( $ this , $ password ) ) ; if ( $ valid !== null ) { return $ valid ; } return static :: $ hasher -> check ( $ password , $ this -> password ) ; }
Check if a given password matches the user's password.

@param string $password
@return bool
Check if a given password matches the user s password .