summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2017-12-21 00:25:30 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-12-28 11:15:26 +0100
commitf5f6ed664d248829c56aac4af3a54909e61216d3 (patch)
tree0f6544a49129698982c94cedd9e87de05e24cd77 /core
parent08cbfb6c6b554eed221aafe185c02dc2e7841d95 (diff)
downloadnextcloud-server-f5f6ed664d248829c56aac4af3a54909e61216d3.tar.gz
nextcloud-server-f5f6ed664d248829c56aac4af3a54909e61216d3.zip
Hide stay logged in checkbox when flow authentication is used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core')
-rw-r--r--core/Controller/LoginController.php1
-rw-r--r--core/templates/login.php2
2 files changed, 3 insertions, 0 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index e87e097e423..e53095a7de7 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -179,6 +179,7 @@ class LoginController extends Controller {
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
$parameters['rememberLoginState'] = !empty($remember_login) ? $remember_login : 0;
+ $parameters['hideRemeberLoginState'] = !empty($redirect_url) && $this->session->exists('client.flow.state.token');
if (!is_null($user) && $user !== '') {
$parameters['loginName'] = $user;
diff --git a/core/templates/login.php b/core/templates/login.php
index 82827bbef03..d28c92e36ef 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -70,6 +70,7 @@ script('core', 'merged-login');
<?php } ?>
<div class="login-additional">
+ <?php if (!$_['hideRemeberLoginState']) { ?>
<div class="remember-login-container">
<?php if ($_['rememberLoginState'] === 0) { ?>
<input type="checkbox" name="remember_login" value="1" id="remember_login" class="checkbox checkbox--white">
@@ -78,6 +79,7 @@ script('core', 'merged-login');
<?php } ?>
<label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>
</div>
+ <?php } ?>
<?php if (!empty($_['canResetPassword'])) { ?>
<div class="lost-password-container">
<a id="lost-password" href="<?php p($_['resetPasswordLink']); ?>">