FIX #18542 REST API: set global $user variable to DolibarrApiAccess::user.
This commit is contained in:
parent
099dd44ffa
commit
eecbfc0ad4
@ -80,7 +80,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
public function __isAllowed()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $db;
|
||||
global $conf, $db, $user;
|
||||
|
||||
$login = '';
|
||||
$stored_key = '';
|
||||
@ -149,6 +149,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
}
|
||||
$fuser->getrights();
|
||||
static::$user = $fuser;
|
||||
$user = $fuser;
|
||||
|
||||
if ($fuser->socid) {
|
||||
static::$role = 'external';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user