Reply To: How to make my site like Facebook
i’m not a mention expert @henrywright 😉
in wp_users table we have 3 cols related to name
user_login | user_nicename | display_name
in the members admin we have 2 cols related to name:
username | name |
Frontend
On the SWA we see
@username
in the member directory we see
@username
on the member profile
@username (near avatar) and first name, last name as page title.
As example:
New account for Jane Doe
if you create the account in the wp admin, you have to enter
username, first name, last name
The default registering on frontend
wp part: Username (aka pseudonym) = Jenny
bp part: Name (aka first name and/or last name) Jane Doe
in both case, the db will contain
user_login | user_nicename | display_name
jenny | jenny | Jane Doe
According to bp_activity_get_user_mentionname function, the appropriate user name for @-mentions is user_nicename or $userdata->user_login
Without forgetting to mention this comment, in bp-activity-functions.php
// In username compatibility mode, hyphens are ambiguous between
// actual hyphens and converted spaces.
//
// @todo There is the potential for username clashes between 'foo bar'
// and 'foo-bar' in compatibility mode. Come up with a system for
// unique mentionnames.
But don’t ask me what is the username compatibility mode, i don’t know ! 😉