This commit is contained in:
Laurent Destailleur 2023-04-13 23:07:41 +02:00
parent be524b5f12
commit 30542b58e1
2 changed files with 3 additions and 1 deletions

View File

@ -70,7 +70,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
$sql = "SELECT login, entity, datestartvalidity, dateendvalidity";
$sql .= " FROM ".MAIN_DB_PREFIX."user";
$sql .= " WHERE openid = '".$db->escape(GETPOST('openid_identity'))."'";
$sql .= " AND entity IN (0,".($_SESSION["dol_entity"] ? ((int) $_SESSION["dol_entity"]) : 1).")";
$sql .= " AND entity IN (0,".(!empty($_SESSION["dol_entity"]) ? ((int) $_SESSION["dol_entity"]) : 1).")";
dol_syslog("functions_openid::check_user_password_openid", LOG_DEBUG);
$resql = $db->query($sql);

View File

@ -19,6 +19,8 @@
* \file htdocs/core/login/functions_openid_connect.php
* \ingroup core
* \brief OpenID Connect: Authorization Code flow authentication
*
* See https://github.com/Dolibarr/dolibarr/issues/22740 for more information about setup openid_connect
*/
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';