diff options
author | Aaron Parecki <aaron@parecki.com> | 2017-01-06 11:00:17 -0800 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2017-01-06 11:00:17 -0800 |
commit | bdff359178d6696d1934a3e350d6cd1b33282251 (patch) | |
tree | b1248b230161cfef705dce25995a48b0c9841f3e /controllers/editor.php | |
parent | 787cb681305d093c471a81ccae1440e3eafd73cb (diff) |
support rich editor in logged-out mode
Diffstat (limited to 'controllers/editor.php')
-rw-r--r-- | controllers/editor.php | 11 |
1 files changed, 5 insertions, 6 deletions
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 @@ <?php $app->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) { |