diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-04-15 19:33:25 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-04-15 19:33:25 +0200 |
commit | 17dfffefb368b167cfbad9b6c48e59e8bc952691 (patch) | |
tree | a88d906b2d81d020768aa7c49833a01859b741e8 /lib/base.php | |
parent | fee95084ae1fddfc616db1e35ee4508cb8e02d57 (diff) | |
download | nextcloud-server-17dfffefb368b167cfbad9b6c48e59e8bc952691.tar.gz nextcloud-server-17dfffefb368b167cfbad9b6c48e59e8bc952691.zip |
Keep used username in URL
This is required until the new controller can also handle POST requests
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index d8ef17e42ed..818e13fbef2 100644 --- a/lib/base.php +++ b/lib/base.php @@ -954,7 +954,14 @@ class OC { if(!\OC::$server->getUserSession()->isLoggedIn()) { $loginMessages = array(array_unique($error), $messages); \OC::$server->getSession()->set('loginMessages', $loginMessages); - header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.login.showLoginForm')); + // Read current user and append if possible + $args = []; + if(isset($_POST['user'])) { + $args['user'] = $_POST['user']; + } + + $redirectionTarget = \OC::$server->getURLGenerator()->linkToRoute('core.login.showLoginForm', $args); + header('Location: ' . $redirectionTarget); } } |