1 | <?php |
||
9 | class UserRegistration |
||
10 | { |
||
11 | /** |
||
12 | * @var Authentication |
||
13 | */ |
||
14 | private $auth; |
||
15 | /** |
||
16 | * @var RoleRepository |
||
17 | */ |
||
18 | private $role; |
||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $input; |
||
23 | |||
24 | public function __construct(Authentication $auth, RoleRepository $role) |
||
29 | |||
30 | /** |
||
31 | * @param array $input |
||
32 | * @return mixed |
||
33 | */ |
||
34 | public function register(array $input) |
||
50 | |||
51 | private function createUser() |
||
55 | |||
56 | private function assignUserToUsersGroup($user) |
||
62 | |||
63 | /** |
||
64 | * Check if the request input has a profile key |
||
65 | * @return bool |
||
66 | */ |
||
67 | private function hasProfileData() |
||
71 | |||
72 | /** |
||
73 | * Create a profile for the given user |
||
74 | * @param $user |
||
75 | */ |
||
76 | private function createProfileForUser($user) |
||
81 | |||
82 | /** |
||
83 | * @return string |
||
84 | */ |
||
85 | private function getDefaultRole() |
||
91 | } |
||
92 |