Jump to:

22978 Posts in 11759 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » Get all users of a group

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1196 Views
  • lclqt12
    Avatar
    Community Member
    2 Posts

    Get all users of a group Link to this post

    Hi all,

    In my security tab, i have two groups : Administrator and NormalUser.
    Now, i want to get all users of NormalUser group.

    How could i do that?

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Get all users of a group Link to this post

    $group = DataObject::get_one("Group", "Title = 'NormalUser'");
    $members = $group->Members();

    1196 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.