public function cleanUsers()
    {
        // Remove any users that were created.
        if ($this->userManager->hasUsers()) {
            foreach ($this->userManager->getUsers() as $user) {
                $this->getDriver()->userDelete($user);
            }
            $this->getDriver()->processBatch();
            $this->userManager->clearUsers();
            // If the authentication manager supports logout, no need to check if the user is logged in.
            if ($this->getAuthenticationManager() instanceof FastLogoutInterface) {
                $this->logout(true);
            } elseif ($this->loggedIn()) {
                $this->logout();
            }
        }
    }