Keep used username in URL
This is required until the new controller can also handle POST requests
This commit is contained in:
parent
fee95084ae
commit
17dfffefb3
1 changed files with 8 additions and 1 deletions
|
@ -954,7 +954,14 @@ class OC {
|
||||||
if(!\OC::$server->getUserSession()->isLoggedIn()) {
|
if(!\OC::$server->getUserSession()->isLoggedIn()) {
|
||||||
$loginMessages = array(array_unique($error), $messages);
|
$loginMessages = array(array_unique($error), $messages);
|
||||||
\OC::$server->getSession()->set('loginMessages', $loginMessages);
|
\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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue