| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace NukaCode\Users\Services; |
||
| 21 | public function register(array $user) |
||
| 22 | { |
||
| 23 | // Create the new user |
||
| 24 | $result = $this->user->create($user); |
||
| 25 | |||
| 26 | if ($result) { |
||
| 27 | // Assign the guest role |
||
| 28 | $this->user->addRole($this->config->get('users.main.guest')); |
||
| 29 | |||
| 30 | // Log the user in |
||
| 31 | $this->auth->login($this->user->getEntity()); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $result; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |