[bug?] CB lastname field includes middle initial

  • thepiston
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 2 months ago - 8 years 2 months ago #77880 by thepiston
This only happens if you choose to use middle initial in Community Builder - the last name field populates with the middle initial. Happens on all of your products actually

Attachments:
Last edit: 8 years 2 months ago by thepiston.

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

  • thepiston
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 1 month ago #79192 by thepiston
Replied by thepiston on topic [bug?] CB lastname field includes middle initial
any way to fix this?

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

More
7 years 8 months ago #85696 by Jeff McDermaid
Replied by Jeff McDermaid on topic [bug?] CB lastname field includes middle initial
Any solution for this? Happening on out site as well.

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

More
7 years 8 months ago - 7 years 8 months ago #86317 by Paul Jacobson
Replied by Paul Jacobson on topic [bug?] CB lastname field includes middle initial
Code in controller\register.php pulls lastname from `users` table `name` field, and uses everything after the first space as a last name.
So if user `name` is "Steve K. Thompson", lastname will be set as "K. Thompson"
Code could be improved by detecting if CB is active, and if so then using CB api to pull in user lastname only.
Or by pulling text after the last blank.
Last edit: 7 years 8 months ago by Paul Jacobson.

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

More
7 years 8 months ago #86319 by Jeff McDermaid
Replied by Jeff McDermaid on topic [bug?] CB lastname field includes middle initial
Any idea why code is writing back to the database? It should not be updating the users lastname.

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

  • thepiston
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 8 months ago #86321 by thepiston
Replied by thepiston on topic [bug?] CB lastname field includes middle initial
I thought I had this mapped to last name field in CB but I just checked and I did not. Have to check if it works now

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

  • thepiston
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 8 months ago - 7 years 8 months ago #86322 by thepiston
Replied by thepiston on topic [bug?] CB lastname field includes middle initial
just checked, mapping to last name does work if using CB - not sure why I didn't do that earlier. I may have posted this before mapping was made available (?)
Last edit: 7 years 8 months ago by thepiston.

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

More
7 years 8 months ago #86323 by Paul Jacobson
Replied by Paul Jacobson on topic [bug?] CB lastname field includes middle initial
Yes, we just changed CB config to use firstname, lastname as user name field.

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

More
7 years 8 months ago #86325 by Jeff McDermaid
Replied by Jeff McDermaid on topic [bug?] CB lastname field includes middle initial
The question remains, should EB be writing to the CB database? I understand grabbing data from CB, but then writing back to it? Not making sense to me.

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

More
7 years 8 months ago #86329 by Paul Jacobson
Replied by Paul Jacobson on topic [bug?] CB lastname field includes middle initial
Mapping to CB fields seems to fix the issue in a simpler fashion. Thanks Piston.

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

Moderators: Tuan Pham Ngoc