Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-18T22:24:59-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=10441 2011-08-18T22:24:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=32365#p32365 <![CDATA[Re: First Name field being populated (s2Member?)]]> Statistics: Posted by PseudoNyhm — August 18th, 2011, 10:24 pm


]]>
2011-08-18T20:58:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=32354#p32354 <![CDATA[Re: First Name field being populated (s2Member?)]]> If/when no names are being collected ( based on your configuration ), the First/Last Name fields remain empty, as they should be.

Statistics: Posted by Jason Caldwell — August 18th, 2011, 8:58 pm


]]>
2011-07-09T16:00:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=25775#p25775 <![CDATA[Re: First Name field being populated (s2Member?)]]>

These edits won't survive an update, of course. As an enhancement to a future version of s2Member, may I request a General Option to choose the desired behavior (if not collecting First/Last Name)? Thanks again for your assistance.

Absolutely. Thanks for reporting back on this.

Statistics: Posted by Jason Caldwell — July 9th, 2011, 4:00 pm


]]>
2011-07-09T15:33:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=25774#p25774 <![CDATA[Re: First Name field being populated (s2Member?)]]> Success!

As suggested, I edited /s2member/includes/classes/registrations.inc.php and commented out the three occurrences of the following block:

Code:
//if (!$fname) /* Default to Username? */
//      if ($login) /* Username and empty Last Name. */
//              eval ('$fname = trim ($login); $lname = "";');
 


Upon registration, no First Name is set. The display name is correctly set in the user admin panel (to the only possible option, which is their username). This holds through the verification phase (using Register Plus Redux plugin). The user was even able to purchase a subscription via PayPal, and s2Member handled everything fine.

These edits won't survive an update, of course. As an enhancement to a future version of s2Member, may I request a General Option to choose the desired behavior (if not collecting First/Last Name)? Thanks again for your assistance.

Statistics: Posted by PseudoNyhm — July 9th, 2011, 3:33 pm


]]>
2011-07-09T13:11:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=25772#p25772 <![CDATA[Re: First Name field being populated (s2Member?)]]>
In your experience, would leaving First Name blank trip up a lot of behavior? Do you know whether lots of other features expect First Name explicitly? Notice that requesting Display Name will still work, because that will return the username.

Instead of altering s2Member, is there a way for me to add something to clear the First Name field after s2Member sets it (some sort of post-registration hook)? I'm not very familiar with WordPress integration (yet), so your input would be most helpful (... before I go breaking things).

Statistics: Posted by PseudoNyhm — July 9th, 2011, 1:11 pm


]]>
2011-07-08T21:13:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=22715#p22715 <![CDATA[Re: First Name field being populated (s2Member?)]]> Ah, I see what you mean now.

Yes, if/when s2Member is configured NOT to require a First/Last Name, s2Member will default the First Name to the Username that is selected by the User during registration. This way other routines and Replacement Codes that reference the User's First Name and Display Name will not get just an empty string. If you'd like to test other methods of handling this, you can run a search for all instances of:
Code:
eval ('$fname = trim ($login); $lname = "";'); 

Inside: /s2member/includes/classes/registrations.inc.php

Statistics: Posted by Jason Caldwell — July 8th, 2011, 9:13 pm


]]>
2011-07-08T19:53:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=22707#p22707 <![CDATA[Re: First Name field being populated (s2Member?)]]>
I've configured Set "Display Name" during Registration? as No (leave Display Name at default WordPress value).

Notice that the Display Name drop-down in the admin user settings is not specifically the issue. The crux of the issue is that something is populating the First Name field with the username upon registration.

If you'd like me to test a patch, just let me know what code to edit, and I'll report how it behaves. I'm not afraid to get my hands dirty. Thanks for helping me with this.

Statistics: Posted by PseudoNyhm — July 8th, 2011, 7:53 pm


]]>
2011-07-08T17:00:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=22687#p22687 <![CDATA[Re: First Name field being populated (s2Member?)]]> viewtopic.php?f=4&t=10400&p=22551#p22686

Statistics: Posted by Jason Caldwell — July 8th, 2011, 5:00 pm


]]>
2011-07-08T13:15:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=22668#p22668 <![CDATA[Re: First Name field being populated (s2Member?)]]>
This is related to my research into Register Plus Redux. To prevent pending (not yet verified) accounts from being able to login, RpR populates the username with a temporary random string (username_XXXXXX). Upon verification, RpR returns the username to that selected by the user. Unfortunately, s2Member has populated the First Name with this ugly string, which sticks forever. It is then possible for other components to reference this, thinking it's a valid First Name.

Statistics: Posted by PseudoNyhm — July 8th, 2011, 1:15 pm


]]>
2011-07-08T12:46:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=22663#p22663 <![CDATA[Re: First Name field being populated (s2Member?)]]>
If I remember correctly, WordPress required the name field to be populated too, so when Jason added the feature to remove the First and Last names requirement, he used the username value to populate the first name.

I just deactivated s2Member in my test installation and tried registering a new account and WordPress only asked for username and email address. They either didn't require it before either and I was under the wrong impression, or they just removed the requirement with the latest release or so.

I'll show this to Jason so he can improve the feature. Thanks!

Statistics: Posted by Cristián Lávaque — July 8th, 2011, 12:46 pm


]]>
2011-07-08T10:40:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10441&p=22650#p22650 <![CDATA[First Name field being populated (s2Member?)]]>
I've confirmed that this name is, indeed, set into the database wp_usermeta first_name record upon registration. WordPress itself does not copy the username to the First Name field. Is this a behavior of s2Member?

Statistics: Posted by PseudoNyhm — July 8th, 2011, 10:40 am


]]>