@@ -114,15 +114,13 @@ |
||
| 114 | 114 | //@todo Validate data |
| 115 | 115 | if($data['password'] == ''){ |
| 116 | 116 | unset($data['password']); |
| 117 | - } |
|
| 118 | - else{ |
|
| 117 | + } else{ |
|
| 119 | 118 | $data['password'] = $this->crypt->create($data['password']); |
| 120 | 119 | } |
| 121 | 120 | |
| 122 | 121 | if($userId){ |
| 123 | 122 | $this->adminUsersMapper->update($data, ['admin_user_uuid' => $userId]); |
| 124 | - } |
|
| 125 | - else{ |
|
| 123 | + } else{ |
|
| 126 | 124 | $data['admin_user_uuid'] = Uuid::uuid1()->toString(); |
| 127 | 125 | $this->adminUsersMapper->insert($data); |
| 128 | 126 | } |
@@ -99,8 +99,7 @@ discard block |
||
| 99 | 99 | $this->adminUserService->save($data, $userId); |
| 100 | 100 | |
| 101 | 101 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
| 102 | - } |
|
| 103 | - catch(\Exception $e){ |
|
| 102 | + } catch(\Exception $e){ |
|
| 104 | 103 | return $this->response->withStatus(302)->withHeader( |
| 105 | 104 | 'Location', |
| 106 | 105 | $this->router->generateUri('admin.users.action', ['action' => 'edit', 'id' => $userId]) |
@@ -115,8 +114,7 @@ discard block |
||
| 115 | 114 | $this->adminUserService->delete($userId); |
| 116 | 115 | |
| 117 | 116 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
| 118 | - } |
|
| 119 | - catch(\Exception $e){ |
|
| 117 | + } catch(\Exception $e){ |
|
| 120 | 118 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
| 121 | 119 | } |
| 122 | 120 | } |