Clean code

This commit is contained in:
Laurent Destailleur 2026-06-22 13:12:39 +02:00
parent c080a3ce29
commit 3e2d3c12f1

View file

@ -36,12 +36,12 @@
*/
function check_authentication($authentication, &$error, &$errorcode, &$errorlabel)
{
global $db, $conf, $langs;
global $db;
global $dolibarr_main_authentication, $dolibarr_auto_user;
$fuser = new User($db);
if (!$error && ($authentication['dolibarrkey'] != $conf->global->WEBSERVICES_KEY)) {
if (!$error && ($authentication['dolibarrkey'] != getDolGlobalString('WEBSERVICES_KEY'))) {
$error++;
$errorcode = 'BAD_VALUE_FOR_SECURITY_KEY';
$errorlabel = 'Value provided into dolibarrkey entry field does not match security key defined in Webservice module setup';