WordPress.org

Ready to get started?Download WordPress

Forums

Active Directory Integration
Adding an existing user to a site (network) error (1 post)

  1. alex.r.vandegrift11
    Member
    Posted 5 months ago #

    I'm having a problem adding existing users to a subsite using ADI and WordPress 3.8.1. I am getting "The requested user does not exist." even though I selected a user from the quick results.

    I am confident the issues stems from having the "Append account suffix to new created usernames." option checked in ADI's options. (Which I have to have for my environment). When this option is checked the username is stored with an @<domain>.com Which violates WordPress's username policy. There is a plugin which I used, Network Username Restrictions Override, that allows me to have email addresses as usernames.

    When under a subsite, going to add new user, then entering an existing user into the "Add Existing User" section and submitting it will error out. The code that handles the looking up of the user looks to see if there is an @ sign in the one field that is submitted (post: email), and if there is it assumes you are sending an email address. When in fact if you look at the post data the value for "email" is the username. Then it can't lookup the user based on email because the email is different than the fully qualified username.
    Line 43: /wp-admin/user-new.php:

    if ( false !== strpos($_REQUEST[ 'email' ], '@') ) {
        $user_details = get_user_by('email', $_REQUEST['email' ]);
    } else {
        if ( is_super_admin() ) {
            $user_details = get_user_by('login',$_REQUEST[ 'email' ]);

    Anyone have any solutions to this? Should I submit this as a bug for wordpress core? As it appears that the @ in the username works everywhere else but here.

    http://wordpress.org/plugins/active-directory-integration/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 5 months ago by alex.r.vandegrift11
  • This topic is not resolved
  • WordPress version: 3.8.1