1 | <?php |
||
10 | class User extends Provider |
||
11 | { |
||
12 | use UploadsImages; |
||
13 | |||
14 | protected $loginRequiredFor = ['profile']; |
||
15 | |||
16 | const REGISTRATION_COMPLETE_EXPERIENCE_ID = '11:10105'; |
||
17 | |||
18 | /** |
||
19 | * Update user profile info. Gets associative array as a param. Available keys of array are: |
||
20 | * 'last_name', 'first_name', 'username', 'about', 'location' and 'website_url'. |
||
21 | * You can also change user avatar by passing 'profile_image'. |
||
22 | * |
||
23 | * @param array $userInfo |
||
24 | * |
||
25 | * @return mixed |
||
26 | */ |
||
27 | public function profile($userInfo) |
||
35 | |||
36 | /** |
||
37 | * Register a new user. |
||
38 | * |
||
39 | * @param string $email |
||
40 | * @param string $password |
||
41 | * @param string $name |
||
42 | * @param string $county |
||
43 | * @param int $age |
||
44 | * @return bool |
||
45 | */ |
||
46 | public function register($email, $password, $name, $county = "UK", $age = 18) |
||
66 | |||
67 | /** |
||
68 | * Login as pinner. |
||
69 | * |
||
70 | * @param string $username |
||
71 | * @param string $password |
||
72 | * |
||
73 | * @throws AuthException |
||
74 | * |
||
75 | * @return bool |
||
76 | */ |
||
77 | public function login($username, $password) |
||
97 | |||
98 | public function logout() |
||
102 | |||
103 | public function isLoggedIn() |
||
107 | |||
108 | /** |
||
109 | * Validates password and login. |
||
110 | * |
||
111 | * @param string $username |
||
112 | * @param string $password |
||
113 | */ |
||
114 | protected function checkCredentials($username, $password) |
||
120 | |||
121 | protected function completeRegistration() |
||
129 | } |
||
130 |