Browse Source
Keep used username in URL
This is required until the new controller can also handle POST requests
remotes/origin/index-with-prefix
Lukas Reschke
10 years ago
No known key found for this signature in database
GPG Key ID: 9AB0ADB949B6898C
1 changed files with
8 additions and
1 deletions
-
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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|