diff --git a/app/Controller/Api/Login.php b/app/Controller/Api/Login.php index 2b71088d..8cb802c3 100644 --- a/app/Controller/Api/Login.php +++ b/app/Controller/Api/Login.php @@ -176,7 +176,7 @@ public static function selectAccount($request) 'characters' => $arrayPlayers, ], 'session' => [ - 'sessionkey' => ($authentication->status == 1) ? "$email\n$password\n$token\n" . SESSION_DURATION : "$email\n$password", + 'sessionkey' => ($authentication && $authentication->status == 1 ) ? "$email\n$password\n$token\n" . SESSION_DURATION : "$email\n$password", 'lastlogintime' => 0, 'ispremium' => $account ? true : false, 'premiumuntil' => $account ? 0 : (time() + ($account->premdays * 86400)),