From b621a399b829f4b390a7d7c1bf3062ffd0f48815 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 18 Apr 2020 00:36:39 +0200 Subject: [PATCH] Fix first/last name and update at login --- conf/class.auth.ldap.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/conf/class.auth.ldap.php b/conf/class.auth.ldap.php index 02a172c..2ebc53f 100644 --- a/conf/class.auth.ldap.php +++ b/conf/class.auth.ldap.php @@ -35,6 +35,13 @@ class ldapDcAuth extends dcAuth # Store the password $cur->user_pwd = $pwd; + # Store informations about the user + $cur->user_id = $user_id; + $cur->user_email = $info[0]['mail'][0]; + $cur->user_name = $info[0]['sn'][0]; + $cur->user_firstname = $info[0]['givenname'][0]; + $cur->user_displayname = $info[0]['cn'][0]; + # If the user exist, then we just update his password. if ($this->core->userExists($user_id)) { @@ -46,10 +53,6 @@ class ldapDcAuth extends dcAuth # a permission "usage" on the blog "default". else { - $cur->user_id = $user_id; - $cur->user_email = $info[0]['mail'][0]; - $cur->user_name = $info[0]['givenname'][0]; - $cur->user_firstname = $info[0]['sn'][0]; $cur->user_lang = 'fr'; # Can change this, PR are welcome $cur->user_tz = 'Europe/Paris'; # Can change this, PR are welcome $cur->user_default_blog = 'default'; # Can change this, PR are welcome