Support

  1. jayrigby
  2. Support
  3. Tuesday, March 03 2015, 06:54 AM
Hi there,

I am trying to update our member data but it is quite complicated.

I tried with the import plugin but there is an issue.

We have a field called member_id in easy profile - this is the value for a user that will not change on either the website or our internal database.

To update the website we need to base our user lookup on member_id not email address because the email address may have changed - so when we do the import the user would not be found and a new user would be created.

We just want to update several fields, including email address, from a cvs file based on member_id not email address.

Please can you help!?

Best wishes,
Jay
Accepted Answer
admin Accepted Answer
Admin
Hi,
Import plugin check if user exists by email, this because Joomla required unique email address for each user.

The query to check this is into file /plugins/jsn/userimport/userimport.php at line 240, so you can change this line from
$query->select('id')->from('#__users')->where($db->quoteName('email').' = '.$db->quote($importUser['email']));

to
$query->select('id')->from('#__jsn_users')->where($db->quoteName('member_id').' = '.$db->quote($importUser['member_id']));


When user exists our plugin not write fields like email or username, so to enable this code this line after line 270
if(isset($importUser['email'])) $query->set($db->quoteName('email').' = '.$db->quote($importUser['email']));


Email and Name (or firstname) are required, if you want to remove email from required field you need to delete (or comment) from line 145 to line 149

NOTE: This code is not tested and not supported and require PHP Knowledge.
  1. more than a month ago
  2. Support
  3. # Permalink


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.