@scotm default WP/BP installations do not allow members to change usernames. So unless you’ve installed a plugin which allows such functionality for members …
Well the primary info field in BP is username and it can be edited in the profile area, correct? Or does that field actually only edit the user’s display name? Regardless, if you change it the code no longer works since it’s looking for whatever page name you chose to create in the first place.
@scotm,
don’t procrastinate before testing please ! The function use
`bp_get_displayed_user_fullname`
So even if you change John to Jim, it stays always to displayed_user_fullname
The mandatory “Name” field on profile contains the displayed user name and can be changed from the user profile admin. (ak displayed_user_FULLNAME !) which is not first name and last name asked by WP on the registering form… 😉
I’ve tested it using your code and if I change the primary username field while logged in to BuddyPress, the link no longer works because it’s looking for the title you chose first (username). Actually, this is of no concern to me anymore since I’ve chosen in my BP install to hide the primary username field from members so that they can’t change it after becoming a member.
One question I do have is whether the code as written is intended to provide a permalink and page title that reads “John Smith’s Page”? My use of it only provides the username in the title, so it reads “John Smith”.
Thx