Loading lib/Controller/AccountController.php +3 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ class AccountController extends Controller { $this->config = $config; $this->urlGenerator = $urlGenerator; $this->logger = $logger; $this->request = $request; } /** Loading Loading @@ -159,8 +160,8 @@ class AccountController extends Controller { $this->session->remove(self::SESSION_USERNAME_CHECK); $this->session->remove(self::CAPTCHA_VERIFIED_CHECK); $this->userService->addUsernameToCommonDataStore($username); $ipAddress = $this->request->getRemoteAddress(); $this->userService->addUsernameToCommonDataStore($username, $ipAddress, $recoveryEmail); $response->setStatus(200); $response->setData(['success' => true]); Loading lib/Service/UserService.php +6 −2 Original line number Diff line number Diff line Loading @@ -420,10 +420,12 @@ class UserService { * If the operation fails, an exception will be thrown. * * @param string $username The username to add to the common data store. * @param string $ipAddress IP Address of user * @param string $recoveryEmail A recovery Email of user * * @throws AddUsernameToCommonStoreException If an error occurs while adding the username to the common data store. */ public function addUsernameToCommonDataStore(string $username) : void { public function addUsernameToCommonDataStore(string $username, string $ipAddress, string $recoveryEmail) : void { $commonServicesURL = $this->apiConfig['commonServicesURL']; $commonApiVersion = $this->apiConfig['commonApiVersion']; Loading @@ -434,7 +436,9 @@ class UserService { $url = $commonServicesURL . $endpoint ; $params = [ 'username' => $username 'username' => $username, 'ipAddress' => $ipAddress, 'recoveryEmail' => $recoveryEmail ]; $token = $this->apiConfig['commonServicesToken']; Loading Loading
lib/Controller/AccountController.php +3 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ class AccountController extends Controller { $this->config = $config; $this->urlGenerator = $urlGenerator; $this->logger = $logger; $this->request = $request; } /** Loading Loading @@ -159,8 +160,8 @@ class AccountController extends Controller { $this->session->remove(self::SESSION_USERNAME_CHECK); $this->session->remove(self::CAPTCHA_VERIFIED_CHECK); $this->userService->addUsernameToCommonDataStore($username); $ipAddress = $this->request->getRemoteAddress(); $this->userService->addUsernameToCommonDataStore($username, $ipAddress, $recoveryEmail); $response->setStatus(200); $response->setData(['success' => true]); Loading
lib/Service/UserService.php +6 −2 Original line number Diff line number Diff line Loading @@ -420,10 +420,12 @@ class UserService { * If the operation fails, an exception will be thrown. * * @param string $username The username to add to the common data store. * @param string $ipAddress IP Address of user * @param string $recoveryEmail A recovery Email of user * * @throws AddUsernameToCommonStoreException If an error occurs while adding the username to the common data store. */ public function addUsernameToCommonDataStore(string $username) : void { public function addUsernameToCommonDataStore(string $username, string $ipAddress, string $recoveryEmail) : void { $commonServicesURL = $this->apiConfig['commonServicesURL']; $commonApiVersion = $this->apiConfig['commonApiVersion']; Loading @@ -434,7 +436,9 @@ class UserService { $url = $commonServicesURL . $endpoint ; $params = [ 'username' => $username 'username' => $username, 'ipAddress' => $ipAddress, 'recoveryEmail' => $recoveryEmail ]; $token = $this->apiConfig['commonServicesToken']; Loading