Skip to:
Content
Pages
Categories
Search
Top
Bottom

Trouble with @ -sign in the username


  • outolumo
    Participant

    @outolumo

    I cannot access a profile that has an @-sign in the username.

    I use email addresses as logins, to integrate with the rest of the system.

    There’s no problem registering or logging in to Buddypress with an email address as an username, and everything else goes fine, but accessing to profile simply redirects to the frontpage without an error message.

    Buddypress creates a properly formatted (@-sign omitted) slug for the profile.

    Any ideas? Should I file this in trac (and if so, how?)

    Using BuddyPress 1.1 and WPMU 2.8.4a

Viewing 8 replies - 1 through 8 (of 8 total)

  • takuya
    Participant

    @takuya

    This may not be a supported type of usernames for wpmu. Did you check wpmu forums as well?


    outolumo
    Participant

    @outolumo

    That does as an workaround, thanks :)


    outolumo
    Participant

    @outolumo

    Ok, I’ll write here a more precise description of what I did in case anyone has similar issues in the future.

    There’s no restriction in registering email as an username in WPMU. The only place I’ve had trouble with the email address as the username is BuddyPress. However, there may be other places, since the @-character is tedious.

    Anyway, since emails are unique in the installation, just like the usernames, they can be to uniquely identify the user logging in. The workaround the to problem is to use a separate username, and set the login procedure to use the email instead of username. Here’s a nice plugin for the task.

    Of course this workaround creates a bunch of problems for me in the integration, since these usernames aren’t necessarily used elsewhere and use of the emails in this fashion is really a hack, but these issues may be easier solved in the authentication code, which is the most crucial component in the integration and where I want to concentrate all my custom settings. Or else I’ll have to figure out something else later.


    ersavla
    Participant

    @ersavla

    For anyone concerned, I encountered the same problem reported by outolumo and can’t happen to use the workaround. I submitted to TRAC…https://trac.buddypress.org/ticket/1356. Will see what happens!


    ersavla
    Participant

    @ersavla

    The resolution from apeatling (in response to https://trac.buddypress.org/ticket/1356):

    If you are allowing @ symbols in usernames, then please add this to your wp-config.php:

    define( ‘BP_ENABLE_USERNAME_COMPATIBILITY_MODE’, true );

    https://codex.buddypress.org/how-to-guides/changing-internal-configuration-settings/

    Worked for me!


    dpolant
    Participant

    @dpolant

    Note that this ticket has been reopened because there are additional problems with this solution, like doing bp actions in which a @ sign user is the subject (edit profile, possibly others).


    dpolant
    Participant

    @dpolant

    I’ve tracked this problem down I think: wp_sanitize_redirect is stripping out @ signs …

    Override this function ( write it in bp-custom or your plugin ) if you want to use emails as usernames. Be careful, you don’t want to just comment everything out because there are security issues to worry about.


    peterverkooijen
    Participant

    @peterverkooijen

    I also use the email login plugin, but generate a username from the fullname using Javascript (link is for blogname from blog title, but the principle is the same). I think that’s a cleaner solution that avoids a lot of the issues you ran into.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Trouble with @ -sign in the username’ is closed to new replies.
Skip to toolbar