diff --git a/appinfo/routes.php b/appinfo/routes.php
index 90b0f6f7dc545425dc526abda9d83bb6b85c4f74..30d2e37b8d9468e4f5992766b722e1e55946116a 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -31,5 +31,6 @@ return ['routes' => [
['name' => 'account#captcha', 'url' => '/accounts/captcha', 'verb' => 'GET'],
['name' => 'account#verify_captcha', 'url' => '/accounts/verify_captcha', 'verb' => 'POST'],
['name' => 'account#validate_fields', 'url' => '/accounts/validate_fields', 'verb' => 'POST'],
+ ['name' => 'account#temp_api_check', 'url' => '/accounts/temp_api_check', 'verb' => 'GET'],
]];
diff --git a/lib/Controller/AccountController.php b/lib/Controller/AccountController.php
index 835841997babe6a602ae65d1d179243ffebee884..05a3096a9fd4b3ca87079cba6d7c1cffc2ce7ecf 100644
--- a/lib/Controller/AccountController.php
+++ b/lib/Controller/AccountController.php
@@ -128,7 +128,6 @@ class AccountController extends Controller {
}
return $response;
}
-
/**
* @NoAdminRequired
* @PublicPage
@@ -267,6 +266,29 @@ class AccountController extends Controller {
* @PublicPage
* @NoCSRFRequired
*
+ *
+ */
+ public function tempApiCheck() {
+ try {
+ $usernames = ['ronakp1', 'ronakp2', 'ronakp3'];
+ foreach ($usernames as $username) {
+ if ($this->userService->isUsernameTaken($username)) {
+ echo $username . ' username taken
';
+ } else {
+ echo $username . ' username is not taken
';
+ }
+ }
+ } catch (Exception $e) {
+ echo 'Username exception issue: ' . $e->getMessage();
+ }
+ }
+ /**
+ * Check if a username is available.
+ *
+ * @NoAdminRequired
+ * @PublicPage
+ * @NoCSRFRequired
+ *
* @param string $username The username to check.
* @param string $displayname The displayname to check.
*