Another MariaDB JSON fix

This commit is contained in:
2020-04-02 21:32:26 +02:00
parent f64e226703
commit 15762350d2
2 changed files with 6 additions and 3 deletions

View File

@@ -125,7 +125,7 @@ class User extends ApiObject {
$this->username = $row['name'];
$this->uid = $userId;
$this->session = new Session($this, $sessionId);
$this->session->setData(json_decode($row["data"]));
$this->session->setData(json_decode($row["data"] ?? '{}'));
$this->session->stayLoggedIn($row["stay_logged_in"]);
if($sessionUpdate) $this->session->update();
$this->loggedIn = true;