forked from verdnatura/hedera-web
Reviewed-on: verdnatura/hedera-web#35 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
07bde10609
|
@ -150,6 +150,7 @@ abstract class Service {
|
||||||
if (!empty($_GET['access_token']))
|
if (!empty($_GET['access_token']))
|
||||||
$token = $_GET['access_token'];
|
$token = $_GET['access_token'];
|
||||||
|
|
||||||
|
echo $_SERVER['HTTP_AUTHORIZATION'] . " _ " . $_GET['access_token'] . "\n";
|
||||||
if (isset($token)) {
|
if (isset($token)) {
|
||||||
$userId = $db->getValue(
|
$userId = $db->getValue(
|
||||||
'SELECT userId FROM salix.AccessToken
|
'SELECT userId FROM salix.AccessToken
|
||||||
|
@ -178,7 +179,7 @@ abstract class Service {
|
||||||
if (!$isActive)
|
if (!$isActive)
|
||||||
throw new UserDisabledException();
|
throw new UserDisabledException();
|
||||||
}
|
}
|
||||||
|
echo $user . "\n";
|
||||||
$db->query('CALL account.myUser_loginWithName(#)', [$user]);
|
$db->query('CALL account.myUser_loginWithName(#)', [$user]);
|
||||||
|
|
||||||
$userChanged = !$anonymousUser
|
$userChanged = !$anonymousUser
|
||||||
|
@ -187,6 +188,7 @@ abstract class Service {
|
||||||
$_SESSION['user'] = $user;
|
$_SESSION['user'] = $user;
|
||||||
|
|
||||||
// Registering the user access
|
// Registering the user access
|
||||||
|
echo $_SESSION['access'] . " _ " . $userChanged . " _ " . $_SESSION['user'] . "\n";
|
||||||
|
|
||||||
if (isset($_SESSION['access']) && $userChanged)
|
if (isset($_SESSION['access']) && $userChanged)
|
||||||
$db->query(
|
$db->query(
|
||||||
|
|
Loading…
Reference in New Issue