Hello, i am having issues with showing an error when a user registers an account using an "in use" email address.
I am updating [url=http://www.ssbits.com/tutorials/2010/site-members-registering-users-and-allowing-them-to-edit-their-details/]Arams site members code[/url]
I have reworked the deprecated code and now it all functions well other than showing the error message on duplicated email used at registration.
//Check for existing member email address
if($member = DataObject::get_one("Member", "`Email` = '". Convert::raw2sql($data['Email']) . "'"))
//Set error message
$form->AddErrorMessage('Email', "Sorry, that email address already exists. Please choose another.", 'bad');
//Set form data from submitted values
//Return back to form
the code catches the duplicated email on sending, but fails to show the error message on redirectBack, im quite new to this but i would not have thought redirectback would be a typical approach as basicaly the page is just refreshing.
i have tried return $this->redirectBack('Email); amongst other shots in the dark and having no success.