diff options
author | Thomas Lange <code@nerdmind.de> | 2021-07-01 15:08:56 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-07-01 15:08:56 +0200 |
commit | cd87a869b1d52fd65f53875527abf3205a4098a0 (patch) | |
tree | 097c33fb9fe6fdaa5a03c6eef5e9e0df742c66dc /admin/user/index.php | |
parent | 1782dbf4ea283e75f49dcaae0dac9fbe53ed56bd (diff) | |
download | blog-cd87a869b1d52fd65f53875527abf3205a4098a0.tar.gz blog-cd87a869b1d52fd65f53875527abf3205a4098a0.tar.xz blog-cd87a869b1d52fd65f53875527abf3205a4098a0.zip |
Redirect to entity create form if no entity exists
Diffstat (limited to 'admin/user/index.php')
-rw-r--r-- | admin/user/index.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/admin/user/index.php b/admin/user/index.php index 6513311..dce21db 100644 --- a/admin/user/index.php +++ b/admin/user/index.php @@ -27,6 +27,13 @@ $lastSite = ceil($count / $site_size); $currentSite = HTTP::GET('site') ?? 1; $currentSite = intval($currentSite); +#=============================================================================== +# Redirect to user create form if no user exists +#=============================================================================== +if(!$count) { + HTTP::redirect(Application::getAdminURL('user/insert.php')); +} + if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) { Application::error404(); } |