summaryrefslogtreecommitdiffstats
path: root/core/Controller/LoginController.php
diff options
context:
space:
mode:
authorDaniel Rudolf <github.com@daniel-rudolf.de>2021-06-30 16:16:05 +0200
committerDaniel Rudolf <github.com@daniel-rudolf.de>2021-06-30 16:20:57 +0200
commit12059eb65b5f72974aab05f81ded890ebd73daab (patch)
tree7da1e4baa80a27ccda958beeb8636aa3dc381102 /core/Controller/LoginController.php
parent75f7287b5ed7251599fd6c67ff3ae319f6a3dfc2 (diff)
downloadnextcloud-server-12059eb65b5f72974aab05f81ded890ebd73daab.tar.gz
nextcloud-server-12059eb65b5f72974aab05f81ded890ebd73daab.zip
Add IUrlGenerator::linkToDefaultPageUrl()
Replaces the deprecated \OC_Util::getDefaultPageUrl() and makes this API public. Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'core/Controller/LoginController.php')
-rw-r--r--core/Controller/LoginController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 8a96db97c9e..5ef40429120 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -38,11 +38,11 @@ use OC\Authentication\WebAuthn\Manager as WebAuthnManager;
use OC\Security\Bruteforce\Throttler;
use OC\User\Session;
use OC_App;
-use OC_Util;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\RedirectResponse;
+use OCP\AppFramework\Http\RedirectToDefaultAppResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Defaults;
use OCP\IConfig;
@@ -150,7 +150,7 @@ class LoginController extends Controller {
*/
public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response {
if ($this->userSession->isLoggedIn()) {
- return new RedirectResponse(OC_Util::getDefaultPageUrl());
+ return new RedirectToDefaultAppResponse();
}
$loginMessages = $this->session->get('loginMessages');
@@ -274,7 +274,7 @@ class LoginController extends Controller {
return new RedirectResponse($location);
}
}
- return new RedirectResponse(OC_Util::getDefaultPageUrl());
+ return new RedirectToDefaultAppResponse();
}
/**