public function delete()
    {
        if ($this->deleteStatement == null) {
            $this->deleteStatement = $this->connection->prepare("DELETE FROM User WHERE username = ?");
            $this->deleteStatement->bindParam(1, $this->username);
        }
        try{
            $this->deleteStatement->execute();
        } catch (PDOException $exception){
            return false;
        }
        if ($this->exists()) {
            return false;
        }
        $this->notifyObservers(User::EVENT_DELETE);
        return true;
    }