What is the file responsible for saving the "name" to the table "#_users"

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 1 month ago - 4 years 1 month ago #145318 by hide10
Hello,

User data registered through Membership Pro is recorded in the column "name" in the table "#_users", too. This "name" is automatically saved as a combination of first_name + last_name.

I want to change the order when saving to "name" to be last_name + first_name.
(If possible, it would be ideal to have this specification only when the site language is selected as Japanese.)

Could you tell me what is the Membership Pro file responsible for saving the "name" to the table "#_users"?

Thanks 
Last edit: 4 years 1 month ago by hide10.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 1 month ago #145319 by Tuan Pham Ngoc
Hello

It's saveRegistration method in components/com_osmembership/helper/helper.php

Regards,

Tuan
The following user(s) said Thank You: hide10

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 1 month ago #145320 by hide10
Hello,

I found that I could achieve my goal by changing the following:
Code:
$userData['name']     = trim($data['first_name'] . ' ' . $data['last_name']);
(line: 3339)

Thank you so much!

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 1 month ago #145321 by Tuan Pham Ngoc
Yes, that's right. Unfortunately, that could not be made using override, so you would need to redo the change each time you update

I will see if I can make it simpler to override the change for the next release

Tuan

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 1 month ago #145322 by hide10
Thank you for your quick and kind response! (^_^)/

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 1 month ago #145323 by Tuan Pham Ngoc
Friendly extension developer, lol.
The following user(s) said Thank You: hide10

Please Log in or Create an account to join the conversation.