1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Get signed in users groups from external script

Discussion in 'XenForo Development Discussions' started by blackvoid, Apr 10, 2012.

  1. blackvoid

    blackvoid Active Member

    Hi
    I would like to get which groups a signed in user is from a external script.
    In phpBB you would do it like this to see if the user has admin permissions.
    PHP:
    <?php
        define
    ('IN_PHPBB'true);
        
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH '../forum';
        
    $phpEx substr(strrchr(__FILE__'.'), 1);
        include(
    $phpbb_root_path 'common.' $phpEx);
        
    $user->session_begin();
        
    $auth->acl($user->data);
        if(
    $auth->acl_get('a_'))
        {
            
    $isAuth true;
        }
        else
        {
            
    $isAuth false;
        }
    ?>
    I need to do this, but with XenForo. Does anyone know how to do this?
     

Share This Page