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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

$member->inGroup and renaming a Member Group


Go to End


3 Posts   1718 Views

Avatar
ivo

Community Member, 19 Posts

6 January 2012 at 11:02pm

Can somebody confirm that after renaming a Member Group the inGroup method with the Group Title still checks on the old name?

I renamed a group from 'Dealer' to 'Retailer' in the Security Tab and
if( $member->inGroup('Retailer') )
returns false
if( $member->inGroup('Dealer') )
returns true

Seemed that in the Groups Table the Code field wasnt updated.

I updated it manually and then it works.
Feels like a Bug, doesnt it?

Avatar
swaiba

Forum Moderator, 1899 Posts

7 January 2012 at 12:35am

Edited: 07/01/2012 10:42pm

If it's a bug (or you think it is) best place is open.silverstripe.org
You are unlikely to get a response from an SS dev here Edit but so you did from Willr!

Avatar
Willr

Forum Moderator, 5523 Posts

7 January 2012 at 9:05pm