1 | <?php |
||
8 | class UserManager extends FOSUserManager |
||
9 | { |
||
10 | public function loadUserByUsername($username) |
||
26 | |||
27 | /** |
||
28 | * If a User already exists with the same email or phone number but |
||
29 | * that it was never enabled, we delete that previous user (this case |
||
30 | * may happen if the user stop the registration process before sending |
||
31 | * the validation code and then change phone etc.). |
||
32 | * However to not confuse user, we keep the same confirmation token. |
||
33 | * |
||
34 | * @param User $user User to check the existence of |
||
35 | * |
||
36 | * @return string|null |
||
37 | */ |
||
38 | public function deleteIfNonEnabledExists(User $user) |
||
60 | |||
61 | private function normalizePhone($phoneNumber) |
||
67 | } |
||
68 |