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

Help getting a list of usergroups from ACP

Discussion in 'XenForo Development Discussions' started by Steve F, Nov 3, 2013.

  1. Steve F

    Steve F Well-Known Member

    I'm trying to make a add-on right now that will list publicly the usergroups from within the ACP, but I also need to be able to exclude certain groups if so desired.

    I was told to use 1 of the following but I can't seem to find a good example anywhere on how I can pull the needed info and use it in my template.

    XenForo_Model::create('XenForo_Model_UserGroup')->getAllUserGroupTitles();

    or

    $this->getModelFromCache('ModelName');

    Currently all I have is a Listener.php. Where and how can I use one of the above so I can display the usergroups?

    Thanks
     
    Last edited: Nov 3, 2013
  2. Steve F

    Steve F Well-Known Member

    I was able to figure this out :) After checking out some other add-ons and XenForo's Model UserGroup.
     
    Chris D likes this.

Share This Page