WordPress.org

Ready to get started?Download WordPress

Forums

Active Directory Integration
Bug in bulkimport.php ($ad_username) (2 posts)

  1. andreas.barth
    Member
    Posted 1 year ago #

    I think I found a bug in bulkimport.php, which caused logins to fail when there are special character (ß) or Umlaute (ä, ö, ü) in the username, and automatic disablling of users is activated.

    The code causing this is:

    // import all relevant users
    		$added_users = 0;
    		$updated_users = 0;
    		foreach ($all_users AS $username) {
    
    /* HERE */		$ad_username = $username;
    
    			// getting user data
    			//$user = get_userdatabylogin($username); // deprecated
    			$user = get_user_by('login', $username);

    for me, changing it to this helped:

    // import all relevant users
    		$added_users = 0;
    		$updated_users = 0;
    		foreach ($all_users AS $username) {
    
    			// getting user data
    			//$user = get_userdatabylogin($username); // deprecated
    			$user = get_user_by('login', $username);
    /* HERE */		$ad_username = get_user_meta($user->ID, 'adi_samaccountname', true);

    This is because WordPress logon names are created with s instead of ß, a instead of ä and so on.
    can anyone confirm this problem / solution?

    cheers,
    Andreas

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

  2. glatze
    Member
    Plugin Author

    Posted 1 year ago #

    Using these special characters (ÄÖÜß) in usernames is never a good idea. Your patch doesn't work correct. New users were not added correctly. And I had no problems with Umlauten in username on 1.1.4 and 1.1.5dev.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic