Commit 1a3a0f1d7b2d5352abfe1eebd476cb6de23174f0
1 parent
f5b437e5
user registration
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
app/library/App/Controllers/UserController.php
... | ... | @@ -44,6 +44,8 @@ class UserController extends CrudResourceController |
44 | 44 | |
45 | 45 | public function registration() { |
46 | 46 | |
47 | + //$this->create(); | |
48 | + | |
47 | 49 | $data = $this->getPostedData(); |
48 | 50 | |
49 | 51 | if (!$data || count($data) == 0) { |
... | ... | @@ -81,4 +83,14 @@ class UserController extends CrudResourceController |
81 | 83 | |
82 | 84 | } |
83 | 85 | |
86 | + protected function transformPostDataValue($key, $value, $data) | |
87 | + { | |
88 | + if ($key == 'password') { | |
89 | + return $this->security->hash($value); | |
90 | + } | |
91 | + else { | |
92 | + return $value; | |
93 | + } | |
94 | + } | |
95 | + | |
84 | 96 | } | ... | ... |