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.

Data Model Questions /

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

Object::add_extension for Member class kicks me out of the CMS!


Go to End


2 Posts   1537 Views

Avatar
novaweb

Community Member, 116 Posts

2 August 2011 at 10:52am

Hey Team,

I've got a couple of sites which require an extended Member class to allow for phone details etc.

In mysite/_config.php I have Object::add_extension("Member", "MyMember");

This is the code for MyMember.php: http://pastie.org/2306228

For some reason when I put this code in to the site, it kicks me from the CMS and won't let me log in again.

I'm hoping someone has run in to this previously, If someone could paste a link to the answer on the forum if there is one :)

Cheers!

Avatar
martimiz

Forum Moderator, 1391 Posts

4 August 2011 at 7:00am

Hi there

Just to confirm that your code works fine in my testinstall 2.4.5 (quick copy/paste), so it must be something else... You did a /dev/build/?flush=1 I presume?