mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
PHP 7.4 and more verbose logging for external authorizations
This commit is contained in:
parent
e7bdd175b2
commit
8eac5140bb
@ -232,7 +232,11 @@ final class session {
|
|||||||
* @return int The current user_id.
|
* @return int The current user_id.
|
||||||
*/
|
*/
|
||||||
public function get_user_id() {
|
public function get_user_id() {
|
||||||
return $this->session['user_id'];
|
if ($this->session !== null) {
|
||||||
|
return $this->session['user_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ class external_api extends cora\api {
|
|||||||
*/
|
*/
|
||||||
protected function curl($arguments) {
|
protected function curl($arguments) {
|
||||||
$user = $this->api('user', 'get', $this->session->get_user_id());
|
$user = $this->api('user', 'get', $this->session->get_user_id());
|
||||||
if ($user['debug'] === true) {
|
if ($user === null || $user['debug'] === true) {
|
||||||
$this::$log_mysql = 'all';
|
$this::$log_mysql = 'all';
|
||||||
$this::$log_mysql_verbose = true;
|
$this::$log_mysql_verbose = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user