Jump to:

23376 Posts in 18254 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Member/Group relationship

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: 537 Views
  • jayslippy
    Avatar
    Community Member
    10 Posts

    Member/Group relationship Link to this post

    Brief Question: Is it possible (or advisable) to change the relationship between Member and Group to one-to-many from many-to-many?

    Detail: I'm building my first website, and using silverstripe to do it. The site will have a large number (hopefully!) of members, who will be split into two categories, client and supplier. The two sets will be completely distinct (except for a couple of special case admins), and see different sides of the website. For example different user profiles, different pages, different tools. Ideally there would be a field in the Member object (added via a decorator) indicating which of these groups the member belongs to.

    I know this is mostly possible with the many-to-many relationship, just by querying whether the member has the relationship with the first group and if not assuming the relationship is with the other group. But it doesn't seem very elegant. There is a possibility of a user being added to both or neither group for example.

    Any advice would be appreciated.

    Thanks.

  • swaiba
    Avatar
    Forum Moderator
    1785 Posts

    Re: Member/Group relationship Link to this post

    Hi jayslippy,

    Welcome to the Forums!

    My advice would be - do not mess with anything in the core - especially something within the security section!
    I've got thousands of members on a site and use a decorator for any custom functionality is fine to show one thing to some and and something else to others.

  • jayslippy
    Avatar
    Community Member
    10 Posts

    Re: Member/Group relationship Link to this post

    That's a good point, I'll take your advice. Thanks for the quick response.

    537 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.