Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

Get all users of a group


Reply


2 Posts   1376 Views

Avatar
lclqt12

Community Member, 2 Posts

2 May 2010 at 9:11pm

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?

Avatar
Hamish

Community Member, 712 Posts

3 May 2010 at 9:44am

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