fix: $_SESSION['name'] is now ok with API calls (tokens, etc)

This commit is contained in:
xdrm-brackets 2017-12-08 02:50:18 +01:00
parent a073f5632d
commit 27942b8b82
2 changed files with 5 additions and 2 deletions

View File

@ -39,8 +39,10 @@
$AUTH = ''; $AUTH = '';
/* (1) Si Auth dans HEADER, on le récupère */ /* (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']; $AUTH = $_SERVER['PHP_AUTH_DIGEST'];
$_SESSION['WS'] = true;
}
/* (2) Si SESSION déja connectée -> no récupère le token */ /* (2) Si SESSION déja connectée -> no récupère le token */
elseif( isset($_SESSION['TOKEN']) && is_string($_SESSION['TOKEN']) ) elseif( isset($_SESSION['TOKEN']) && is_string($_SESSION['TOKEN']) )

View File

@ -127,6 +127,7 @@
return json_encode($returnData); return json_encode($returnData);
} }
} }
?> ?>