aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user/insert.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-17 22:00:39 +0200
committerThomas Lange <code@nerdmind.de>2021-06-17 22:00:39 +0200
commit5555624546ea48d6327700f32b80848e0662dc90 (patch)
tree47d61fb756a6cb008aaf33586d292fcfe43da2a1 /admin/user/insert.php
parent91d8a28c664afa5378735bcd0efe068dd74d589f (diff)
parent0a2614cb69fc732c2115ef2f0c356f39f602d311 (diff)
downloadblog-optimization.tar.gz
blog-optimization.tar.xz
blog-optimization.zip
Merge branch 'master' into 'optimization'optimization
Diffstat (limited to 'admin/user/insert.php')
-rw-r--r--admin/user/insert.php44
1 files changed, 17 insertions, 27 deletions
diff --git a/admin/user/insert.php b/admin/user/insert.php
index 53d35df..59b9444 100644
--- a/admin/user/insert.php
+++ b/admin/user/insert.php
@@ -40,30 +40,20 @@ if(HTTP::issetPOST('id', 'slug', 'username', 'password', 'fullname', 'mailaddr',
}
#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $FormTemplate = Template\Factory::build('user/form');
- $FormTemplate->set('FORM', [
- 'TYPE' => 'INSERT',
- 'INFO' => $messages ?? [],
- 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
- 'TOKEN' => Application::getSecurityToken()
- ]);
-
- $InsertTemplate = Template\Factory::build('user/insert');
- $InsertTemplate->set('HTML', $FormTemplate);
-
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', $Language->text('title_user_insert'));
- $MainTemplate->set('HTML', $InsertTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+# Build document
+#===============================================================================
+$FormTemplate = Template\Factory::build('user/form');
+$FormTemplate->set('FORM', [
+ 'TYPE' => 'INSERT',
+ 'INFO' => $messages ?? [],
+ 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER),
+ 'TOKEN' => Application::getSecurityToken()
+]);
+
+$InsertTemplate = Template\Factory::build('user/insert');
+$InsertTemplate->set('HTML', $FormTemplate);
+
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', $Language->text('title_user_insert'));
+$MainTemplate->set('HTML', $InsertTemplate);
+echo $MainTemplate;