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