SSO User Email Address map only first character

Issue #524 resolved
Grip Admin created an issue

Problem is in model/user/auth.php as per Issue #219 https://bitbucket.org/jsuto/piler/issue/219/sso-users-email-addressess

Line 432 (in this version), after $a = $query->row;

        if(isset($a['mail']['count'])) { $username = $a['mail'][0]; } else { $username = $a['mail']; }

The if(isset($a['mail']['count'])) test is returning TRUE even though $a['mail'] is not an array. Therefore $username is being set to $a['mail'][0] which is the first character.

PHP version is 5.3.3. Active Directory version is Windows Server 2008R2.

Following the debug instructions in Issue #219 provides the information in the attached file. Some data obfuscated or redacted.

Comments (3)

  1. Janos SUTO repo owner

    Try to fix this line like this:

    if(is_array($a['mail'])) { $username = $a['mail'][0]; } else { $username = $a['mail']; }
    
  2. Log in to comment