From 7758c0b8a76ebc2c96bfeb08652bcb41bc5c60bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Sep 2021 16:06:19 +0200 Subject: [PATCH] Fix phpcs --- htdocs/api/class/api_access.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 075059fefda..5a4097b089b 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -147,10 +147,12 @@ class DolibarrApiAccess implements iAuthenticate if ($result <= 0) { throw new RestException(503, 'Error when fetching user :'.$fuser->error.' (conf->entity='.$conf->entity.')'); } + $fuser->getrights(); + + // Set the property $user to the $user of API static::$user = $fuser; - - // Set the global variable $user to the $user of API + // Set also the global variable $user to the $user of API $user = $fuser; if ($fuser->socid) {