• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

PukiWiki


Commit MetaInfo

Revisão0de00ddd7cbbed03e9b274c712c7e02bcfefde65 (tree)
Hora2016-02-08 01:51:18
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Mensagem de Log

BugTrack2/374 Get fullname from LDAP server on AUTH_TYPE_EXTERNAL

Mudança Sumário

Diff

--- 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;