BBpress problem : Ppl logged with Facebook have their real name appearing on their profil.

Hi,

As the title explain it by itself, I have a problem with people connecting to my website using Facebook.

When they do so, their real name and family name appears on their profil ("@......-......") and I definitly don't want this. I'd like them to be able to select their login name.

I checked in the forum, and in the settings of my apps on Facebook but I didn't find anything interesting.

Could you please help me on that one ?

Regards,
Ben. :)

Comments

  • May be a problem with the BBpress plugin... I still can't find out... :/
  • Any idea someone ? :(
  • Hi,
    The plugin builds the user's display name from their Facebook account name (formatted name, display names in our identity record).
    The user can edit this later.
    One alternative, is to add a Wordpress filter that changes the display name (to something that you must come up with), as in docs.oneall.com/plugins/guide/social-login-wordpress/#3.
    One possible filter hook is oa_social_login_filter_new_user_fields (not mentioned in the examples provided in our docs).

    Hope this helps.
  • Hi,

    You say that "the user can edit this later" but they can't (or I didn't find a way to do so). Even me, as an admin, I can't change their login name...

    For the "filter" part, that will be over my competences... :/
  • Indeed, they can't change the login name, but they should be able to change their display name? (maybe I'm missing something :-)
  • Nop, you're not actually, but both login name and display name are appearing on bbpress profiles. Moreover, if you want to "call" someone like on Facebook "@name", you have to use the login name, not the display name. :(
  • Ah yes, thanks.
    Well, not many options: the filter option (but still won't let the user choose their login name), find an additional WP/BB plugin that can do this (interrupt the registration process), or we could modify the plugin to allow the user to confirm/edit the fields.
  • Hi,
    We could help you with the filter if you wish (send you code to copy/paste).
  • That would be awesome ! Thank for your time Frederic, I appreciate :)
  • Hi,
    Here is a proposal.
    It will define as user login (but not let the user choose one) either the first name, or 4 characters from the display name (in case of duplicates, it appends a number).

    Copy the following code into the theme functions file:
    As administrator, go to Appearance > Editor, from the list on the right, choose the file: Theme Functions (functions.php). This should display a php file to edit.

    Then, copy/paste the following code to the end of that functions.php file:
    function oa_modify_login ($user_fields) { /* Modifiable user data: $user_fields = array ( 'user_login' => $user_login, 'display_name' => (!empty ($user_full_name) ? $user_full_name : $user_login), 'user_email' => $user_email, 'first_name' => $user_first_name, 'last_name' => $user_last_name, 'user_url' => $user_website, 'user_pass' => $user_password, 'role' => $user_role );*/ $new_login = ''; // If we have a firstname, use that: if (!empty ($user_fields['first_name'])) { $new_login = $user_fields['first_name']; } // If not, use the first 4 characters of the display name: else { $keep = min (4, strlen($user_fields['display_name'])); $new_login = substr ($user_fields['display_name'], 0, $keep); } // login must be unique, add a sequential number if used: if (username_exists ($new_login)) { $i = 1; $new_login_tmp = $new_login; do { $new_login_tmp = $new_login . ($i++); } while (username_exists ($new_login_tmp)); $new_login = $new_login_tmp; } $user_fields['user_login'] = $new_login; return $user_fields; } add_filter('oa_social_login_filter_new_user_fields', 'oa_modify_login', 10, 1);

    Let us know how it goes.
  • Well, I really appreciate what you do for me but I have to admit I'd like people to choose their login or I'd like the login to be the same as the display name, nothing esle :(

    With my website, people won't tolerate to see their name (or a part of it) appearing.

    So if you don't have any other solution (I'd understand) I'll have to remove the login that does this.
  • Hi,
    We could generate an anonymous login (no trace of names).
    They would still need to edit their display name later (or start with a default anonymous value).

    Currently, we cannot let the user choose a login (might be possible, as your situation suggests).

    Let us know!
  • Well, by "generate" I understand that a name they never see before will appear on their profile name. Right ? :(
  • yes :-)
  • Well, so...forget about it. I'll remove the Facebook login and others that are working the same way. :/

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.