Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Specific member group on ModelAdmin in SS3

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

Page: 1
Go to End
Author Topic: 320 Views
  • sajok
    Community Member
    82 Posts

    Specific member group on ModelAdmin in SS3 Link to this post


    I created a group for "Students", and I want to have a ModelAdmin section that lists only members from group "Students". Using the following code lists all site members:

    class StudentsAdmin extends ModelAdmin {
    public static $managed_models = array('Member');
    static $url_segment = 'Students';
    static $menu_title = 'Students';

    public function getList() {
    $list = parent::getList();
    // ...
    return $list;

    I'm trying to use the getList() function to exclude all groups except Students group, something like:

    $list->exclude('Group', 'Admins');

    any help how I can do this?


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.