diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index ab95f1ad25e..47b9017b008 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('users', 'admin', 'companies', 'ldap')); $id = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'userldap'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?: 'userldap'; // To manage different context of search // Security check $socid = 0; @@ -125,9 +125,7 @@ print ''; if (getDolGlobalString('LDAP_SERVER_TYPE') == "activedirectory") { $ldap = new Ldap(); $result = $ldap->connectBind(); - if ($result > 0) { - $userSID = $ldap->getObjectSid($object->login); - } + ($result > 0) ? ($userSID = $ldap->getObjectSid($object->login)) : $userSID = ''; print '