Commit e611d3a3cb1164612cf67e5be9ed47cc42cc592e
1 parent
11e41ecb
registration
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
app/library/App/Controllers/UserController.php
@@ -58,14 +58,19 @@ class UserController extends CrudResourceController | @@ -58,14 +58,19 @@ class UserController extends CrudResourceController | ||
58 | 58 | ||
59 | $item = $this->createModelInstance(); | 59 | $item = $this->createModelInstance(); |
60 | 60 | ||
61 | + $item->save(); | ||
62 | + die($item->id); | ||
63 | + | ||
64 | + | ||
61 | $newItem = $this->createItem($item, $data); | 65 | $newItem = $this->createItem($item, $data); |
62 | 66 | ||
63 | if (!$newItem) { | 67 | if (!$newItem) { |
64 | return $this->onCreateFailed($item, $data); | 68 | return $this->onCreateFailed($item, $data); |
65 | } | 69 | } |
66 | 70 | ||
67 | - $last_id = $newItem->getWriteConnection()->lastInsertId(); | ||
68 | - $responseData = $this->getFindData($last_id); | 71 | + |
72 | + //$last_id = $newItem->getWriteConnection()->lastInsertId(); | ||
73 | + //$responseData = $this->getFindData($last_id); | ||
69 | 74 | ||
70 | $response = $this->getCreateResponse($responseData, $data); | 75 | $response = $this->getCreateResponse($responseData, $data); |
71 | 76 |