Support

  1. thefbi
  2. Support
  3. Thursday, July 01 2021, 04:15 PM
  4.  Subscribe via email
Hello,
i have a little problem. I have a component (OS Service Booking) that link the name field of the registration form to the core name field of Joomla.

The problem is in Easyprofile, i can choose if i want to use Firstname + Lastname or only Name.
But if i choose only name, it is not the name field but the firstname field used.

So, when i register with OSB, the firstname field is empty in my user profile page. I dont have "name" field.
Is there a way to "say" to the firstname field of Easyprofil to "get" the content of name field of Joomla ?

(Joomla 3.9.27)
thefbi Accepted Answer
Basic
Hello, little up on this problem please ...
  1. 3 weeks ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
Hi and sorry for late reply,
So, when i register with OSB, the firstname field is empty in my user profile page. I dont have "name" field.
Is there a way to "say" to the firstname field of Easyprofil to "get" the content of name field of Joomla ?
Unfortunately this is not possible natively, anyway you can manage this with a simple plugin:
- Download, Install and Enable Skeleton Plugin (you will find it at http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:
public function triggerProfileUpdate($user,&$data,$changed,$isNew){ 
if(empty($data['firstname'])) $data['firstname'] = $user->name;
}
  1. 3 weeks ago
  2. Support
  3. # 2
thefbi Accepted Answer
Basic
Hi, great !
Thank you very much. I will try it and come back post the result.
Regards
  1. 3 weeks ago
  2. Support
  3. # 3
thefbi Accepted Answer
Basic
Just a question, is normal you have put a & before $data ?
  1. 3 weeks ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
Hi,
yes, because $data var is passed by reference (not by value), this is useful if you want to change values that will be stored, for example
$data['sum_field'] = $data['operator1'] + $data['operator2'];
  1. 3 weeks ago
  2. Support
  3. # 5
thefbi Accepted Answer
Basic
OK, thank you.
  1. 3 weeks ago
  2. Support
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

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.