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.

Archive /

Our old forums are still available as a read-only archive.

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

Invoking "sendInfo()" function after form registration


Go to End


1543 Views

Avatar
Cy

Community Member, 11 Posts

9 October 2008 at 12:33pm

Edited: 09/10/2008 12:34pm

What would be an ideal way to invoke the sendInfo() function in sapphire/security/Member.php upon form registration. I am most likely way off but this is what i've tried with no success:

function register($data, $form) {
	$member = new Member();
	$form->saveInto($member);
	$member->write();
	$member->login();
	Group::addToGroupByName($member, 'members');
	sendInfo('signup', $data);
	Director::redirect($this->Link() . 'thanks');
}