Commit 1bc086feb5eb27538c0770b74479b3bd4e2b16bb
1 parent
526faee1
KTS-768: If we get an array for the CN value, show the first value in the
array. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5493 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
8 additions
and
0 deletions
plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
| ... | ... | @@ -339,6 +339,14 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider { |
| 339 | 339 | $this->oPage->addError($aSearchResults->getMessage()); |
| 340 | 340 | $aSearchResults = null; |
| 341 | 341 | } |
| 342 | + | |
| 343 | + if (is_array($aSearchResults)) { | |
| 344 | + foreach (array_keys($aSearchResults) as $k) { | |
| 345 | + if (is_array($aSearchResults[$k]['cn'])) { | |
| 346 | + $aSearchResults[$k]['cn'] = $aSearchResults[$k]['cn'][0]; | |
| 347 | + } | |
| 348 | + } | |
| 349 | + } | |
| 342 | 350 | } |
| 343 | 351 | |
| 344 | 352 | $massimport = KTUtil::arrayGet($_REQUEST, 'massimport'); | ... | ... |