I have a SilverStripe website where I would like to keep track of changes to a members profile. If I add the Versioned extension to the Member class (well the CustomMember class) will that cause any problems to the the Members functions, e.g. login in, or viewing the admin section?
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.
I have no idea what side effects applying versioned to Member might cause.
As an alternative I'd add an onAfterWrite instead that save the changes...
public function onAfterWrite() {
parent::onAfterWrite();
$arrChanged = $this->getChangedFields(true,1);
if (count($arrChanged)) {
//create a MemberHistory log here?
}
}
That's the method the website is using at the moment, I'm just wondering if versioning would be cleaner and give an option of rolling back changes.