mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 01:10:42 +08:00
Fix #664 - Ldap Autocreate extra fields
Check for array when returning extra fields
This commit is contained in:
parent
084f3098ab
commit
ca6f9f12ab
1 changed files with 5 additions and 1 deletions
|
@ -159,7 +159,11 @@ class AppLdapUserProvider implements UserProviderInterface, PasswordUpgraderInte
|
|||
$userInfo = [];
|
||||
foreach ($this->ldapAutoCreateExtraFieldsMap as $ldapKey => $fieldKey) {
|
||||
if (isset($extraFields[$ldapKey])) {
|
||||
$userInfo[$fieldKey] = $extraFields[$ldapKey];
|
||||
if(is_array($extraFields[$ldapKey])){
|
||||
$userInfo[$fieldKey] = $extraFields[$ldapKey][0] ?? '';
|
||||
} else {
|
||||
$userInfo[$fieldKey] = $extraFields[$ldapKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue