Thread:Extension talk:LDAP Authentication/wgLDAPRetrievePrefs not working

Just a note that some of the example configs out there are wrong. If wgLDAPRetrievePrefs isn't working for you, check that you have your arrays setup correctly.

A working config:

$wgLDAPPreferences = array( 'ExampleDomain' => array( "email"=>"mail","realname"=>"displayName","nickname"=>"displayName","language"=>"preferredlanguage" ) );

A non-working config:

$wgLDAPPreferences = array( 'ExampleDomain' => '"email"=>"mail","realname"=>"displayName","nickname"=>"displayName","language"=>"preferredlanguage"') );

Note the missing array element. This got me for some time, and after I got this working, I was able to turn on RealNames in my organisation.