Conflict (sort of) with Social Login & Mentions
Hey guys, hoping to get some suggestions on an issue I’m having on my site where members who Register with the WordPress Social Login plugin wind up having their @mention be whatever name is on the social account they register with, which some people are not comfortable with preferring anonymity. This isn’t just a plugin issue though, because other members have created accounts and put their name in their profile when they were registering, not realizing it was going to be displayed prominently on their profile as an @mention.
I would prefer to continue using the BuddyPress @mention feature, but going into the database and changing it each time a member is not comfortable is time-consuming.
Is there a plugin or another way to do this?
How is the @mention chosen? Is it automatically the member’s first and last name when they register?
I am using the most current versions of WordPress and BuddyPress: 4.0 and 2.1
I’ve never done this, but…
I believe @mention uses a member’s login name – so it is unique.
I also believe you can change that so their user_nicename is used by putting:
( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', false );
Note: user_login, user_nicename and display_name are all the same unless changed in wp-admin or a user’s profile. But that change only applies to display_name afaik.
So if you want the functionality of @mentions, I believe you need to expose user_login.
@[name] is set via \buddypress\bp-members\bp-members-functions.php -> bp_core_get_username() which has a filter
apply_filters( 'bp_core_get_username', $username );
You could experiment with that filter and see what breaks :}
I don’t know, but it sure would be cool if someone who has done it could verify. I’ve not done a lot of playing around with filters, either in WP or BuddyPress, and it’s overwhelming and makes me nervous.
I’ll contact the plugin creator on the issue of the automatic user_login name, but there are a lot of posts dating back quite a few years with forum owners crying out how confusing it is for their members when their members can change their nicename but the @mention is something else; sure would be nice if the option to synchronize them were part of the core BuddyPress functionality.
Short of giving your users extra hugs and re-assuring them that their WordPress usernames aren’t particularly private bits of data, you’re going to have to get your hands dirty. 🙂
It might be down to how the other plugin creates user accounts. Most plugins that allow sign-in using other services’ authentication systems (such as Facebook) don’t “properly” create WordPress user accounts; they use MySQL statements directly instead of using WordPress’ APIs.
This can cause problems with plugins that expect certain user record fields to be in a particular format (if some other plugin came along and just inserted something in a custom format in place). I am not saying that this is the case with this plugin, as I haven’t looked at its code, but I’ve seen this sort of thing before.
If you can create a test account and then go into your DB’s wp_users table and find your test user, and let us know what the values of the user_login, user_nicename, display_name fields are — and which one of these @mentions is using, and which one you would like it to use.
I built @mentions in the last BuddyPress release and while I’m not sure if it’s possible to get it to change how it behaves like this, understanding what you’d want different with real data from a test account will help us help you, and at worse, give a suggestion for ways we could make advanced customisations possible for this in future BuddyPress releases.
Kk, sorry it took so long to get back to this; I had to walk away from it all for a bit as my whole setup is taking more of my time than I am able to produce any content, and I’m ready to throw in the towel.
I just took a peek in my database and it looks like the plugin just takes the person’s account name from whatever account they log into and uses that for everything, the login, nicename and display/nickname, so no way of knowing which one it pulls the @mention from.
I’m assuming in a normal registration it takes it from the person’s first and last name, though? This probably works on a lot of “business”-types sites, where people use their birth-names anyway, but the vast majority of forums I’ve visted show that people prefer to use quirky, expressive names that reflect their personalities. For this reason, I think BuddyPress would better serve a lot of forums with the @mentions if there were at least an option to use the nicename instead of the username.
I understand it gets really complicated with people being able to change their nicename, but on most forums people don’t get to do that, only Admins can do that for them, because it confuses the other membership; they don’t know who’s “talking”.
So for a ton of people who are used to phpbb3-type forums, it would be great to turn off the ability to change nicenames and have nicenames be @mentions. Or even have nicenames be @mentions, and if you change your nicename, your @mention just has to stay the same, because it’s just too complicated to get the coding to do that, but still, nicename over “real name”, because when you put your real name in a forum you don’t expect it to be used as your forum name, you just don’t. And hand-holding or no, it *will* discourage people from using a forum.
There’s mah feedbacks, lemmie know if there’s anymore database peeking you’d like me to do, and thanks for trying to help 🙂
- The topic ‘Conflict (sort of) with Social Login & Mentions’ is closed to new replies.