diff options
author | Rayn0r <andrew@ilpss8.myfirewall.org> | 2018-10-28 06:28:54 +0100 |
---|---|---|
committer | Rayn0r <andrew@ilpss8.myfirewall.org> | 2018-10-30 11:36:16 +0100 |
commit | 85eb43baffac1f5836d08161ced19b98e71189c0 (patch) | |
tree | 98d8be83a7be8ad4ed7c92a6638da8de11d01dbc | |
parent | 13abee2836e00a91a7c2962920624f15f587e1cb (diff) | |
download | nextcloud-server-85eb43baffac1f5836d08161ced19b98e71189c0.tar.gz nextcloud-server-85eb43baffac1f5836d08161ced19b98e71189c0.zip |
added possibility to disable autocomplete in login form
Signed-off-by: Rayn0r <Andre.Weidemann@web.de>
-rw-r--r-- | core/Controller/LoginController.php | 8 | ||||
-rw-r--r-- | core/templates/login.php | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index a9fb22f21b7..d34f243f15f 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -171,6 +171,14 @@ class LoginController extends Controller { $parameters['loginName'] = ''; $parameters['user_autofocus'] = true; } + + $autocomplete = $this->config->getSystemValue('login_form_autocomplete', true); + if ($autocomplete){ + $parameters['login_form_autocomplete'] = 'on'; + } else { + $parameters['login_form_autocomplete'] = 'off'; + } + if (!empty($redirect_url)) { $parameters['redirect_url'] = $redirect_url; } diff --git a/core/templates/login.php b/core/templates/login.php index 989ea1eaad5..3035d23da70 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -42,7 +42,7 @@ use OC\Core\Controller\LoginController; aria-label="<?php p($l->t('Username or email')); ?>" value="<?php p($_['loginName']); ?>" <?php p($_['user_autofocus'] ? 'autofocus' : ''); ?> - autocomplete="on" autocapitalize="none" autocorrect="off" required> + autocomplete="<?php p($_['login_form_autocomplete']); ?>" autocapitalize="none" autocorrect="off" required> <label for="user" class="infield"><?php p($l->t('Username or email')); ?></label> </p> @@ -51,7 +51,7 @@ use OC\Core\Controller\LoginController; placeholder="<?php p($l->t('Password')); ?>" aria-label="<?php p($l->t('Password')); ?>" <?php p($_['user_autofocus'] ? '' : 'autofocus'); ?> - autocomplete="on" autocapitalize="off" autocorrect="none" required> + autocomplete="<?php p($_['login_form_autocomplete']); ?>" autocapitalize="none" autocorrect="off" required> <label for="password" class="infield"><?php p($l->t('Password')); ?></label> </p> |