I’m have a question

{if is_admin}

Hi Guys,
I was wondering if you could clarify what an admin is to the user_groups_module and what I have to set in EE's member group preferences to create a valid admin group that is also an admin in user group module's eyes. I would like to use is_admin to let site content editors / admins edit user groups and moderate members but not be EE super admins. Is this possible or is is_admin the same as member_group == "1" ?

Thanks and sorry if I missed it in the docs.
1 person has
this question
+1
Reply
  • Hi Mathew -

    Good question. {if is_admin} determines if the logged in user is either in the "Super Admin" member group (#1) or they are the creator of the user group. If you need to extend beyond that, I would suggest using something like {if member_group == "1" OR member_group == "2" OR member_group == "45"}, etc.

    Hopefully that helps.

    Thanks,

    Doug
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Also note that {if is_admin} is only available on the "members" tag. On the "groups" tag, you can use {if is_owner} to do the same type of check.

    Thanks,

    Doug
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Hi Doug, Can I just check.. from the docs

    "Members will only have access to edit User Groups where they are the Admin—just make sure to only show the Edit link to people who have access to avoid confusion."

    So I couldn't use if {member_group == "x"} to grant access to the edit group front end form for a content editor group?

    Is "Admin" in the docs here meaning the same user as {if is_admin i.e. "..is either in the "Super Admin" member group (#1) or they are the creator of the user group."?

    ..Anyway I can/will try out different combinations of {if member_group == , if is_admin, if is_owner, to see what can be acheived for a content editor group and other things where I'd like to play with who can do what, just can be nice to know what will work with the module then if it doesn't I know I've done something wrong.

    Another q related to this, can a member group be created that can moderate groups in the back end? I tried giving the member group access to the module (in member group preferences for the content editor group) but no joy the User Groups tab doesn't appear in the EE CP.

    Thanks,
    Mathew.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Hi Mathew -

    "Members will only have access to edit User Groups where they are the Admin—just make sure to only show the Edit link to people who have access to avoid confusion."

    So I couldn't use if {member_group == "x"} to grant access to the edit group front end form for a content editor group?

    Is "Admin" in the docs here meaning the same user as {if is_admin i.e. "..is either in the "Super Admin" member group (#1) or they are the creator of the user group."?


    The "Admin" mentioned in the docs refers to either the creator of the group and anyone in the Super Admin group ("1").

    Yes, you could sure use the {if member_group} to limit access to the creation form, but the edit form actually restricts access based on whether they are the creator or a Super Admin.

    Another q related to this, can a member group be created that can moderate groups in the back end? I tried giving the member group access to the module (in member group preferences for the content editor group) but no joy the User Groups tab doesn't appear in the EE CP.


    At this time there is no way to give EE member groups access to moderate groups. Admins and the group creators are the only ones that have that privilege at this point.

    Regards,

    Doug
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated