From 8256b99443cffbdffb61c411133f3eef0a41d390 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 15 Jul 2016 14:47:13 +0200 Subject: [PATCH] fix not working forced password change on login screen --- api/src/Auth/Ads.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/api/src/Auth/Ads.php b/api/src/Auth/Ads.php index 155b34fe35..43e31669aa 100644 --- a/api/src/Auth/Ads.php +++ b/api/src/Auth/Ads.php @@ -216,8 +216,15 @@ class Ads implements Backend if(!$account_id || $GLOBALS['egw_info']['flags']['currentapp'] == 'login') { $admin = false; - $username = $GLOBALS['egw_info']['user']['account_lid']; - $account_id = $GLOBALS['egw_info']['user']['account_id']; + if (!empty($GLOBALS['egw_info']['user']['account_id']) && $GLOBALS['egw_info']['user']['account_id'] > 0) + { + $username = $GLOBALS['egw_info']['user']['account_lid']; + $account_id = $GLOBALS['egw_info']['user']['account_id']; + } + else + { + $username = $GLOBALS['egw']->accounts->id2name($account_id); + } } else {