| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | protected function prepareForValidation() |
||
| 15 | { |
||
| 16 | $data = $this->all(); |
||
| 17 | |||
| 18 | $role = app('rinvex.fort.role')->where('slug', 'manager')->first(); |
||
| 19 | $data['user']['is_active'] = ! config('rinvex.fort.registration.moderated'); |
||
| 20 | ! $role || $data['user']['roles'] = [$role->id]; |
||
| 21 | |||
| 22 | $this->replace($data); |
||
| 23 | } |
||
| 24 | |||
| 49 |