@@ 278-297 (lines=20) @@ | ||
275 | } |
|
276 | ||
277 | ||
278 | function get_fullname($username) |
|
279 | { |
|
280 | global $config, $ldap_connection; |
|
281 | ||
282 | $attributes = array('name'); |
|
283 | $result = ldap_search( |
|
284 | $ldap_connection, |
|
285 | $config['auth_ad_base_dn'], |
|
286 | get_auth_ad_user_filter($username), |
|
287 | $attributes |
|
288 | ); |
|
289 | $entries = ldap_get_entries($ldap_connection, $result); |
|
290 | if ($entries['count'] > 0) { |
|
291 | $membername = $entries[0]['name'][0]; |
|
292 | } else { |
|
293 | $membername = $username; |
|
294 | } |
|
295 | ||
296 | return $membername; |
|
297 | } |
|
298 | ||
299 | ||
300 | function get_group_list() |
@@ 350-369 (lines=20) @@ | ||
347 | return current($result[0]['mail']); |
|
348 | } |
|
349 | ||
350 | function get_fullname($username) |
|
351 | { |
|
352 | global $config, $ldap_connection; |
|
353 | ||
354 | $attributes = array('name'); |
|
355 | $result = ldap_search( |
|
356 | $ldap_connection, |
|
357 | $config['auth_ad_base_dn'], |
|
358 | get_auth_ad_user_filter($username), |
|
359 | $attributes |
|
360 | ); |
|
361 | $entries = ldap_get_entries($ldap_connection, $result); |
|
362 | if ($entries['count'] > 0) { |
|
363 | $membername = $entries[0]['name'][0]; |
|
364 | } else { |
|
365 | $membername = $username; |
|
366 | } |
|
367 | ||
368 | return $membername; |
|
369 | } |
|
370 | ||
371 | ||
372 | function get_group_list() |