public function requestPasswordResetToken($email, $userAgent, $ip4) { $user = $this->userRepository->findOneByEmail($email); $userToken = UserToken::createResetPasswordToken($user, UserToken::getRandomToken(), $userAgent, $ip4); $this->createUserToken($userToken); }
public function testGetRandomToken() { $this->assertSame(40, strlen(UserToken::getRandomToken())); }