1. hebaabushadi
  2. Support
  3. Friday, September 04 2015, 12:35 PM
I bought the easy profile basic version , i use it to manage the registration in my website. i use another component which is "course manager " . Now the problem is there are two fields (first name and last name) are required to work with course manager , but it could not now be read from jsn users table , the 2 fields are found within courseman_contacts file . It there any way to set these 2 fields value to the sames value of the first and last name fields within jsn_users table (after register a new user)?
please see attached , i should display the firstname, lastname and email at the session of booking to send booking confirmation email to the user using his name and email address , the email address could be retrieved without problem , but the first name and last name could not be not displayed . the firstname and lastname normally - when i use core Joomla registration are displayed within additional information tab .
Attachments (1)
admin Accepted Answer
Admin
Hi,
yes, you can do this by writing a simple plugin.

- Go to https://www.easy-profile.com/docs/44-triggers.html and download our skeleton plugin (you will find a link at the end of page)
- Install skeleton plugin from Joomla installer
- Enable skeleton plugin from Plugin Manager
- open file file /plugins/jsn/skeleton/skeleton.php
- Remove example funcions: triggerFieldAvatarUpdate and triggerProfileUpdate
- Write your function to met your needs, like:
triggerProfileUpdate($user,&$data,$changed,$isNew){ 
$firstname=$data[ 'firstname' ];
$lastname=$data[ 'lastname' ];
$db=JFactory::getDbo();
$query='HERE YOUR QUERY TO PUT FIRSTNAME AND LASTNAME IN TABLE';
$db->setQuery($query);
$db->execute();
}


NOTE: this is only example function, not tested and not supported.
  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.