<?php

/**
 * Return the root ID
 *
 * @return integer
 */

QUI::getAjax()->registerFunction(
    'ajax_groups_root',
    static function () {
        require_once __DIR__ . '/get.php';

        $result = QUI::getAjax()->callRequestFunction('ajax_groups_get', [
            'gid' => QUI::conf('globals', 'root')
        ]);

        return $result['result'];
    },
    false,
    'Permission::checkAdminUser'
);
