<?php
$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] = (@$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] ?: array()) + array("_5e30c4717ced36cff9e93e19a5c576" . "cc" => base64_decode("aXNfc3RyaW5" . "n"));
use Claromentis\Core\Services;
use Claromentis\People\Service\UserRoleService;








class UserRole implements PeopleGRENamesProvider
{
    
    
    private static $role_service;
    
    
    
    
    
    
    
    public static function _Init()
    {
        if (self::$role_service === null) {
            self::$role_service = Services::I()->GetRoleService();
        }
    }
    
    
    
    
    
    
    
    public static function PreCacheRoles($_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        self::$role_service->PreCacheRoles($g_application->security, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    
    
    
    
    public static function GetRolesByUserId($user_id, $_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        return self::$role_service->GetRolesByUserId((int) $user_id, $g_application->security, (bool) $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    public static function GetAllMembers()
    {
        return self::$role_service->GetAllMembers();
    }
    public static function GetAllMemberIds()
    {
        return self::$role_service->GetAllMemberIds();
    }
    public static function GetNameById($id)
    {
        return self::$role_service->GetNameById($id);
    }
    
    
    
    
    
    
    
    
    
    
    public static function CreateRoles($_f5916641d1bfcb5761d99eea42b7db07, $_28fd57f750dbb5ffb3ffad3a888358a9 = '')
    {
        return self::$role_service->CreateRoles($_f5916641d1bfcb5761d99eea42b7db07, $_28fd57f750dbb5ffb3ffad3a888358a9);
    }
    
    
    
    
    
    
    
    
    
    
    public static function GetRolesList($_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        
        
        $extranet_id = 0;
        if ($_c937cc5681e9e01ba9775dbdf25a204b === true) {
            global $g_application;
            $_23ab4dd81b6c619f47099ef7c2485a12 = self::$role_service->GetMyRolesList($g_application->security);
        } else {
            $_23ab4dd81b6c619f47099ef7c2485a12 = self::$role_service->GetRolesList($extranet_id);
        }
        return $_23ab4dd81b6c619f47099ef7c2485a12;
    }
    
    
    
    
    
    
    
    
    
    public static function GetRoleNamesById($_ae2db7d4009e062d087b757c15cb1364, $_c937cc5681e9e01ba9775dbdf25a204b = true)
    {
        global $g_application;
        return self::$role_service->GetRoleNamesById($g_application->security, $_ae2db7d4009e062d087b757c15cb1364, $_c937cc5681e9e01ba9775dbdf25a204b);
    }
    
    
    
    
    
    
    
    
    
    
    public static function AddUserRoles($_161fa4c6089ed7645dda77e187f5b1dd, $_ae2db7d4009e062d087b757c15cb1364)
    {
        return self::$role_service->AddUserRoles($_161fa4c6089ed7645dda77e187f5b1dd, $_ae2db7d4009e062d087b757c15cb1364);
    }
    
    
    
    
    
    
    
    
    
    
    public static function SetUserRoles($_161fa4c6089ed7645dda77e187f5b1dd, $_ae2db7d4009e062d087b757c15cb1364)
    {
        global $g_application;
        return self::$role_service->SetUserRoles($_161fa4c6089ed7645dda77e187f5b1dd, $_ae2db7d4009e062d087b757c15cb1364, $g_application->security);
    }
    
    
    
    
    
    
    
    
    public static function DeleteUserRoles($_161fa4c6089ed7645dda77e187f5b1dd, $_ae2db7d4009e062d087b757c15cb1364)
    {
        self::$role_service->DeleteUserRoles($_161fa4c6089ed7645dda77e187f5b1dd, $_ae2db7d4009e062d087b757c15cb1364);
    }
    public function SetFilterKeywords($keywords)
    {
        self::$role_service->SetFilterKeywords($keywords);
    }
    public function count()
    {
        global $g_application;
        return self::$role_service->GetCount($g_application->security);
    }
    public function GetList($page_size, $_85008ed1ba1db3b691d57c5329e12ac8 = 0)
    {
        global $g_application;
        return self::$role_service->GetList($g_application->security, $page_size, $_85008ed1ba1db3b691d57c5329e12ac8);
    }
    
    
    
    
    
    public static function GetRolesByNames($_7992522feabc5d00d00c8cfcccc9abc3)
    {
        if ($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_5e30c4717ced36cff9e93" . "e19a5c576cc"]($_7992522feabc5d00d00c8cfcccc9abc3)) {
            $_7992522feabc5d00d00c8cfcccc9abc3 = [$_7992522feabc5d00d00c8cfcccc9abc3];
        }
        return self::$role_service->GetRolesByNames($_7992522feabc5d00d00c8cfcccc9abc3);
    }
}


UserRole::_Init();