AJAX Register Save First Name and Last Name
- 1pbx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
4 years 2 months ago #8231
by 1pbx
Hello,
One of the major reason to purchase this extension was email login instead of username, and also separate the First name and Last name fields.
I see by checking the code that you simply merge these two fields together to create the Joomla user "Name field".
I need to store these two fields separately. How is the best way to accomplish this?
One of the major reason to purchase this extension was email login instead of username, and also separate the First name and Last name fields.
I see by checking the code that you simply merge these two fields together to create the Joomla user "Name field".
I need to store these two fields separately. How is the best way to accomplish this?
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
4 years 2 months ago - 4 years 2 months ago #8232
by Saka
Emir Sakic
www.sakic.net
Hello,
Yes, it will merge the first and last name into existing name field. If you really want to keep them separated you can create 2 custom fields: First name and Last name. And then you will need some trickery in the template override to show these fields above and also to fill in the Joomla name field automatically as it is required by Joomla.
Yes, it will merge the first and last name into existing name field. If you really want to keep them separated you can create 2 custom fields: First name and Last name. And then you will need some trickery in the template override to show these fields above and also to fill in the Joomla name field automatically as it is required by Joomla.
Emir Sakic
www.sakic.net
Last Edit: 4 years 2 months ago by Saka.
Please Log in or Create an account to join the conversation.
- 1pbx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
4 years 2 months ago #8233
by 1pbx
Is this something you can help me with? This is a large reason I purchased the extension. I want to take that registration data and use it after to propagate other external APIs, which I will need the first and last name separate.
I am confident I can get the template override taken care of (I think), and I did see in your source code where it merges the first and last name together (with space in between) to create the Name field. I don't have it in front of me now to see the difficulty of creating that name field based off two custom fields, but I don't think it would be too difficult.
If you could provide code sample of any difficult aspect of accomplishing this, I'm sure I can take it from there and complete it. I can post finished code here afterwards for if anyone else is interested.
P.S. I realized this after the fact, but is it not a massive security risk to allow unlimited AJAX calls to query for if an email address has already been taken? Or is there some security measure in place I am unaware of? Perhaps cors protection along with rate limiting?
I know during testing I could get API response about if an e-mail was registered as fast as I could click, I could check thousands of emails in no time (based on the 1 or 0 returned in the AJAX API call to the component for if email exists).
I hope I am overthinking this, or if not, that there is a way to disable AJAX verification of unique email as that is a big security issue in my opinion.
I am confident I can get the template override taken care of (I think), and I did see in your source code where it merges the first and last name together (with space in between) to create the Name field. I don't have it in front of me now to see the difficulty of creating that name field based off two custom fields, but I don't think it would be too difficult.
If you could provide code sample of any difficult aspect of accomplishing this, I'm sure I can take it from there and complete it. I can post finished code here afterwards for if anyone else is interested.
P.S. I realized this after the fact, but is it not a massive security risk to allow unlimited AJAX calls to query for if an email address has already been taken? Or is there some security measure in place I am unaware of? Perhaps cors protection along with rate limiting?
I know during testing I could get API response about if an e-mail was registered as fast as I could click, I could check thousands of emails in no time (based on the 1 or 0 returned in the AJAX API call to the component for if email exists).
I hope I am overthinking this, or if not, that there is a way to disable AJAX verification of unique email as that is a big security issue in my opinion.
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
4 years 2 months ago #8234
by Saka
Emir Sakic
www.sakic.net
Sure, send me a mail through the contact form and I will point you to the right direction.
About AJAX requests: well, the call is only allowed from the local host, which is no different than submitting the form every time to find out if the email is taken.
About AJAX requests: well, the call is only allowed from the local host, which is no different than submitting the form every time to find out if the email is taken.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.