diff --git a/controllers/editor.php b/controllers/editor.php index 0f4380b..bfe70af 100644 --- a/controllers/editor.php +++ b/controllers/editor.php @@ -1,12 +1,11 @@ get('/editor', function() use($app) { - if($user=require_login($app)) { - $html = $app->render('editor.php', [ - 'user' => $user - ]); - $app->response()->body($html); - } + $user = require_login($app, false); + $html = $app->render('editor.php', [ + 'user' => $user + ]); + $app->response()->body($html); }); $app->post('/editor/publish', function() use($app) { diff --git a/views/editor.php b/views/editor.php index f1d2250..5ab9442 100644 --- a/views/editor.php +++ b/views/editor.php @@ -44,7 +44,9 @@