PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Changing Name Displayed Publicly

s2Member Plugin. A Membership plugin for WordPress®.

Changing Name Displayed Publicly

Postby amgregory » April 11th, 2011, 8:07 am

I have a membership site that integrates s2Member and BuddyPress. Since I started using s2Member, new signups have reverted to displaying the member's first name only in BuddyPress. I want to display first and last name.

Does anyone know if there's a way to tweak this from the s2Member side? Or would I have to do this from BuddyPress? I can't find a way to make the tweak either way.
User avatar
amgregory
Registered User
Registered User
 
Posts: 25
Joined: March 19, 2011

Re: Changing Name Displayed Publicly

Postby Jason Caldwell » April 12th, 2011, 5:37 pm

Thanks for your inquiry.

s2Member sets a User's Display Name to the First Name during paid registration. This, along with some other minor issues related to BuddyPress Profiles vs. s2Member Profiles still need to get worked out. We're working on these in the development release, so they should be resolved soon.

In the mean time, if you know some PHP and would like to tweak things yourself, run a search for ( "display_name" ) inside this file: /s2member/includes/classes/registrations.inc.php.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Changing Name Displayed Publicly

Postby amgregory » April 13th, 2011, 10:40 am

Thanks, Jason. That worked!
User avatar
amgregory
Registered User
Registered User
 
Posts: 25
Joined: March 19, 2011

Re: Changing Name Displayed Publicly

Postby ProCody_Rookie_coding » April 22nd, 2011, 9:54 pm

Hey guys,

I am trying to solve this same problem on my s2 site. However I want the default display name
to be the username given at registration.

(also I am using free membership, so I guess these would be subscriber names...idk if this is important in the code)
'
This is what I have in my regstrations.inc.php

Code: Select all
if (!$user->first_name && $fname){
                                 update_user_meta ($user_id, "display_name", $subscr_id);
                                 wp_update_user (array ("ID" => $user_id, "display_name" => $subscr_id));
                              }


Any help is appreciated!
User avatar
ProCody_Rookie_coding
Registered User
Registered User
 
Posts: 4
Joined: April 19, 2011

Re: Changing Name Displayed Publicly

Postby amgregory » April 23rd, 2011, 6:36 am

I'm not exactly sure how to switch to username, but here is the code I used for First and Last Name. I think you can just replace what I have after "display_name =>" with "$user_id"

Just note that I think you have to change it in three places in the file (lines 410, 552 and 669 in my file). And also, my changes were overwritten when I updated with the last s2member update, so you'll have to remember to re-upload your new file manually after any plugin updates.

Code: Select all
if (!$user->first_name && $fname)
                                 update_user_meta ($user_id, "first_name", $fname) ./**/
                                 wp_update_user (array ("ID" => $user_id, "display_name" => $fname . " " . $lname));
User avatar
amgregory
Registered User
Registered User
 
Posts: 25
Joined: March 19, 2011

Re: Changing Name Displayed Publicly

Postby ProCody_Rookie_coding » April 24th, 2011, 3:35 pm

Hey amgregory,

thanks for the response, it didn't work like id like it to.
Still displaying the first names.

but i will try and figure it out.

Thanks again!
User avatar
ProCody_Rookie_coding
Registered User
Registered User
 
Posts: 4
Joined: April 19, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 3 guests

cron