<?php

/**
 * Switches the current session user to the original user
 *
 * @throws QUI\Exception
 */

use QUI\MasterLogin\Manager;

QUI::getAjax()->registerFunction(
    'package_quiqqer_masterlogin_ajax_frontend_logBack',
    function ($csrfToken) {
        Manager::checkCsrfToken((string)$csrfToken);
        Manager::logBack();
    },
    ['csrfToken'],
    'Permission::checkUser'
);
