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

Usergroup Constants for Administrator = 3 ?

Discussion in 'XenForo Development Discussions' started by Marcus, Jul 25, 2015.

  1. Marcus

    Marcus Well-Known Member

    Is there a constant defining the administrator usergroup? In my addon Email Notification of ACP Log Errors I want to replace

    Code:
    $conditions['user_group_id'] = 3;
    with something more convenient like

    Code:
    $conditions['user_group_id'] = XenForo_Application::get('usergroup')->admin
    ... which I did not find.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    PHP:
    XenForo_Model_User::$defaultAdminGroupId
     
    Marcus likes this.
  3. batpool52!

    batpool52! Well-Known Member

    PHP:
    $conditions['user_group_id'] = XenForo_Model_User::$defaultAdminGroupId;
    Edit: Just 0.001 secs late :/
     
    Marcus likes this.
  4. Marcus

    Marcus Well-Known Member

    Awesome, thanks!
     

Share This Page