Description
For the action wpdirauth_userauthenticated and wpdirauth_usercreated, the second parameter passed to your callback function will be an array containing details of the user that was authenticated/created (respectfully). The following is a sample of what that array might look like, depending on what additional LDAP attributes were requested via the wpdirauth_ldapreturnkeys filter.
Example
User authenticating: gilzowp
Extra LDAP attributes requested: [‘telephonenumber’,’department’]
[php]
array (
’email’ => ‘[email protected]’,
‘last_name’ => ‘Gilzow’,
‘first_name’ => ‘Paul’,
‘ldap_entry’ =>
array (
‘sn’ =>
array (
‘count’ => 1,
0 => ‘Gilzow’,
),
0 => ‘sn’,
‘telephonenumber’ =>
array (
‘count’ => 1,
0 => ‘(555) 555-1212’,
),
1 => ‘telephonenumber’,
‘givenname’ =>
array (
‘count’ => 1,
0 => ‘Paul’,
),
2 => ‘givenname’,
‘department’ =>
array (
‘count’ => 1,
0 => ‘Some Department’,
),
3 => ‘department’,
‘mail’ =>
array (
‘count’ => 1,
0 => ‘[email protected]’,
),
4 => ‘mail’,
‘count’ => 5,
‘dn’ => ‘CN=Gilzow\\, Paul,CN=Users,DC=domain,DC=tld’,
),
)
[/php]