Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing usernames doesn't change member profile URLs

  • @gcmo

    Participant

    Hi!

    I’m adding BP to a WP install with hundreds of users (and these users have have their email as username)

    As a result member URL are “disclosing” users email and I’ve to change that.
    (e.g. domain.com/members/giacomogmail-com <— (for: giacomo@gmail.com)

    An acceptable solution for us would be to have a “prefix + USER ID” in the slug
    (e.g.domain.com/members/u571 )

    So even if changing username is not encouraged by WP core I tried to replace in the DB the username of user “571”
    I checked and username is correctly replaced from “giacomo@gmail.com” to “u571″

    But now if I visit the old url I still see the same profile (domain.com/members/giacomogmail-com)

    And if I visit the “new” url I get a 404
    (e.g. domain.com/members/u571 )

    Should I recreate the user URLs somewhere?
    I tried to update permalinks but that didn’t help.

    Thanks in advance!
    Giacomo

    PS. off topic: I’m reposting because I think the previous topic had too many links and has been blocked by anti-spam!? even though I didn’t see any notice/warning…

Viewing 3 replies - 1 through 3 (of 3 total)
  • @danbp

    Participant

    Possibly not the best solution, but have you tested this plugin ?
    https://wordpress.org/support/plugin/username-changer

    @gcmo

    Participant

    Hi Dan!
    Thanks for the hint.

    If I use that plugin it works
    If I do change the username programmatically ($wpdb->update) it doesn’t update the user URL… will try to investigate why 🙂

    Cheers
    Giacomo

    @gcmo

    Participant

    Just an update in case someone is googling the same thing

    (at least for my install) the slug of each member is not user_login but the user_nicename field.
    So changing that will change the user profile URL

    Thx again for the hint!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing usernames doesn't change member profile URLs’ is closed to new replies.
Skip to toolbar