From 6c48a95f465b7c92372fbcd1abfd2f46578d6304 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Feb 2017 20:30:35 +0200 Subject: [PATCH] registration --- app/library/App/Controllers/UserController.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+), 0 deletions(-) diff --git a/app/library/App/Controllers/UserController.php b/app/library/App/Controllers/UserController.php index 9014b06..e8ad57b 100755 --- a/app/library/App/Controllers/UserController.php +++ b/app/library/App/Controllers/UserController.php @@ -87,6 +87,22 @@ class UserController extends CrudResourceController } + protected function transformPostData($data) + { + $result = []; + + foreach ($data as $key => $value) { + $result[$key] = $this->transformPostDataValue($key, $value, $data); + } + + if (!empty($result)) + { + $result['role'] = 'User'; + } + + return $result; + } + protected function transformPostDataValue($key, $value, $data) { if ($key == 'password') { -- libgit2 0.21.4