Support

  1. sultaninen
  2. General
  3. Friday, August 15 2014, 08:58 AM
Hi
We have a large user base with custom fields set up with JSN easyprofile. e.g. there is a custom field zip, city and country. We have set those as custom fields, as we wanted to retrieve the entire user base as reports (XSL/CSV) from one single database table. However, as we are integrating JSN easyprofile with other extensions (event booking) we would like to synchronise those fields with the core fields of the the joomla user table (which is basically "address", "zip", "city", "country", "phone";). Is it possible to sync some custom fields with the core fields of joomla user profile?

Thanks for any help
Bernhard
admin Accepted Answer
Admin
Yes I think this is possible.
You can use our triggers to sync table with new data on user update profile or registration. try to read here https://www.easy-profile.com/docs/44-triggers.html

You can do something like this:
- Download, install, and enable our Skeleton plugin
- Go on file /plugins/jsn/skeleton/skeleton.php
- delete examples functions triggerFieldAvatarUpdate and triggerProfileUpdate
- write a function like this:
triggerProfileUpdate($user,&$data,$changed,$isNew){

$db=JFactory::getDbo();
$query="UPDATE #__users SET city = ".$db->quote($data['field_alias_of_city'])." WHERE id=".$user->id;
$db->setQuery($query);
$db->execute();

}


NOTE: this code is not tested and not supported and require minimum PHP knowledge
  1. more than a month ago
  2. General
  3. # 1
sultaninen Accepted Answer
Pro
Thanks a lot for the ultra-fast reply... Now, I need to know where I can download the skeleton plugin. Do you know where I can find it on the website?

Thanks
Bernhard
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
you can download skeleton plugin at the end of documentation page at https://www.easy-profile.com/docs/44-triggers.html
  1. more than a month ago
  2. General
  3. # 3
  • 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.