Fixed login/logout issue
This commit is contained in:
@@ -64,7 +64,7 @@ class Router
|
||||
}
|
||||
}
|
||||
|
||||
if ($url != '/login' && $url != '/') {
|
||||
if ($url != '/login' || $url != '/') {
|
||||
$query_string = $this->getQueryStringVariable($url);
|
||||
if ($query_string) {
|
||||
$sessid = explode('=', $query_string[0]);
|
||||
@@ -87,6 +87,7 @@ class Router
|
||||
$obj = $this->getNamespace($obj);
|
||||
if (is_array($record)) {
|
||||
$obj = new $obj();
|
||||
header('client: api');
|
||||
$obj->logout($record['uid']);
|
||||
die();
|
||||
} else {
|
||||
@@ -103,8 +104,8 @@ class Router
|
||||
$obj = $this->getNamespace($obj);
|
||||
$obj = new $obj();
|
||||
$obj->logout($record['uid']);
|
||||
header('Location: /');
|
||||
die();
|
||||
// header('Location: /');
|
||||
// die();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user