fix: $_SESSION['name'] is now ok with API calls (tokens, etc)
This commit is contained in:
parent
a073f5632d
commit
27942b8b82
|
@ -39,8 +39,10 @@
|
|||
$AUTH = '';
|
||||
|
||||
/* (1) Si Auth dans HEADER, on le récupère */
|
||||
if( isset($_SERVER['PHP_AUTH_DIGEST']) && is_string($_SERVER['PHP_AUTH_DIGEST']) )
|
||||
if( isset($_SERVER['PHP_AUTH_DIGEST']) && is_string($_SERVER['PHP_AUTH_DIGEST']) ){
|
||||
$AUTH = $_SERVER['PHP_AUTH_DIGEST'];
|
||||
$_SESSION['WS'] = true;
|
||||
}
|
||||
|
||||
/* (2) Si SESSION déja connectée -> no récupère le token */
|
||||
elseif( isset($_SESSION['TOKEN']) && is_string($_SESSION['TOKEN']) )
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
return json_encode($returnData);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue