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

Get the username of the logged in admin

Discussion in 'XenForo Development Discussions' started by xpl0iter, Oct 21, 2012.

  1. xpl0iter

    xpl0iter Active Member

    I am posting something to the database via an addon. I would like to get the information about who posted it. So can anyone help me on this?
     
  2. James

    James Well-Known Member

    Just check the usergroup?
    XenForo_Model_User -> isMemberOfUserGroup($user, $userGroupIds)
     
  3. xpl0iter

    xpl0iter Active Member

    I am sorry james I am not really good at this. So if you can elaborate this a little bit more it would be really helpful.
    BTW do I get the name of the person who posted it by your method?
     
  4. Daniel 'RTRD'

    Daniel 'RTRD' Well-Known Member

    Code:
    <xen:if is="{xen:helper ismemberof, $user, 3}">
    Content here
    </xen:if>
    3 is the usergroupid for Administrators
     
  5. xpl0iter

    xpl0iter Active Member

Share This Page