Skip to:
Content
Pages
Categories
Search
Top
Bottom

Conflict (sort of) with Social Login & Mentions

Viewing 4 replies - 1 through 4 (of 4 total)
  • @shanebp

    Moderator

    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 );
    in bp-custom.php

    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 :}

    @halo-diehard

    Participant

    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.

    @djpaul

    Keymaster

    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.

    @halo-diehard

    Participant

    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 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conflict (sort of) with Social Login & Mentions’ is closed to new replies.
Skip to toolbar