Support

  1. Fredrik_Widfeldt
  2. Support
  3. Tuesday, July 01 2014, 10:37 AM
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?
Accepted Answer
admin Accepted Answer
Admin
Hi Fredrik,
Yes, try to add this code:
JFactory::getApplication()->setUserState('com_users.edit.profile.redirect',JRoute::_('index.php?option=com_users&view=profile&layout=edit',false));
  1. more than a month ago
  2. Support
  3. # Permalink
Fredrik_Widfeldt Accepted Answer
Pro
Excelent! That works just as I wanted!
Thanks for the superb support!
  1. more than a month ago
  2. Support
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.