23376 Posts in 18254 Topics by 2867 members
|Go to End|
7 January 2012 at 12:53am
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.
7 January 2012 at 1:00am
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.
7 January 2012 at 8:12am
That's a good point, I'll take your advice. Thanks for the quick response.
|Go to Top|