• R/O
  • HTTP
  • SSH
  • HTTPS

pukiwiki: Commit


Commit MetaInfo

Revision0de00ddd7cbbed03e9b274c712c7e02bcfefde65 (tree)
Time2016-02-08 01:51:18
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack2/374 Get fullname from LDAP server on AUTH_TYPE_EXTERNAL

Change Summary

Incremental Difference

--- a/lib/auth.php
+++ b/lib/auth.php
@@ -244,7 +244,7 @@ function ensure_valid_auth_user()
244244 {
245245 global $auth_type, $auth_users, $_msg_auth, $auth_user, $auth_groups;
246246 global $auth_user_groups, $auth_user_fullname;
247- global $auth_provider_user_prefix;
247+ global $auth_provider_user_prefix, $ldap_user_account;
248248 switch ($auth_type) {
249249 case AUTH_TYPE_BASIC:
250250 {
@@ -278,13 +278,14 @@ function ensure_valid_auth_user()
278278 if (isset($_SESSION['authenticated_user_fullname'])) {
279279 $fullname = $_SESSION['authenticated_user_fullname'];
280280 } else {
281+ $fullname = $user;
281282 if ($auth_type === AUTH_TYPE_EXTERNAL && $ldap_user_account) {
282283 $ldap_user_info = ldap_get_simple_user_info($user);
283284 if ($ldap_user_info) {
284285 $fullname = $ldap_user_info['fullname'];
285- $_SESSION['authenticated_user_fullname'] = $fullname;
286286 }
287287 }
288+ $_SESSION['authenticated_user_fullname'] = $fullname;
288289 }
289290 }
290291 $auth_user = $user;
Show on old repository browser