Hi,
I'm trying to implement a member registration functionality with activation codes in Easy Profile.
The purpose is to only allow registration for members of an association.
I have added two required profile fields "activation_code" and "member_no_reg" that are not on the registration form, but that they are asked to update their profile with when logging in first time after registering.
I have implemented a plugin that check the activation_code and member_no against a table with activation codes in teh database. When the activation code is not correct I would like to reset the field and require the user to enter the correct code.
I try doing this by the following code:
unset($data['activation_code']);
unset($data['member_no_reg']);
JFactory::getApplication()->enqueueMessage('The membership number and activation code does not match', 'error');
The error is displayed and the fields are not saved, but the edit profile form closes and instead the profile is displayed.
Is there any way from the trigger to prevent the edit profile from closing?