summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-02-21 19:52:00 +0100
committerAleksander Machniak <alec@alec.pl>2012-02-21 19:52:00 +0100
commit402a865574651b22071f31c2f6aa3a15b6b99b04 (patch)
treee245feea04be8caa2cae0cb7fdb5e8508c4369f6
parent53bcfa4b7d47d67d5ed260703fbd115340a83b92 (diff)
downloadwebadmin-402a865574651b22071f31c2f6aa3a15b6b99b04.tar.gz
Handle better cn=* logins
-rw-r--r--lib/kolab_client_task.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 20f8acf..0f84df3 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -143,6 +143,10 @@ class kolab_client_task
$user['language'] = $res['preferredlanguage'];
$user['fullname'] = $res['cn'];
}
+ // @TODO: why user.info returns empty result for 'cn=Directory Manager' login?
+ else if (preg_match('/^cn=([a-zA-Z ]+)/', $login['username'], $m)) {
+ $user['fullname'] = $m[1];
+ }
$_SESSION['user'] = $user;
header('Location: ?');