1 | <?php namespace Modules\User\Services; |
||
7 | class UserRegistration |
||
8 | { |
||
9 | /** |
||
10 | * @var Authentication |
||
11 | */ |
||
12 | private $auth; |
||
13 | /** |
||
14 | * @var RoleRepository |
||
15 | */ |
||
16 | private $role; |
||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | private $input; |
||
21 | |||
22 | public function __construct(Authentication $auth, RoleRepository $role) |
||
27 | |||
28 | /** |
||
29 | * @param array $input |
||
30 | * @return mixed |
||
31 | */ |
||
32 | public function register(array $input) |
||
48 | |||
49 | private function createUser() |
||
53 | |||
54 | private function assignUserToUsersGroup($user) |
||
60 | |||
61 | /** |
||
62 | * Check if the request input has a profile key |
||
63 | * @return bool |
||
64 | */ |
||
65 | private function hasProfileData() |
||
69 | |||
70 | /** |
||
71 | * Create a profile for the given user |
||
72 | * @param $user |
||
73 | */ |
||
74 | private function createProfileForUser($user) |
||
79 | } |
||
80 |