summaryrefslogtreecommitdiffstats
path: root/core/lostpassword
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-18 11:43:11 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-06-19 11:48:09 +0200
commit7f6a9e8fef6216538bbd839baf24eb655e2c57e4 (patch)
treefa1b1d0802152f3d47b247dc9e6889e9e257e184 /core/lostpassword
parent904227a0e4b95be4f1a0aa87b9173fd2fea966c8 (diff)
downloadnextcloud-server-7f6a9e8fef6216538bbd839baf24eb655e2c57e4.tar.gz
nextcloud-server-7f6a9e8fef6216538bbd839baf24eb655e2c57e4.zip
fix lost password page, don't show checkbox is encryption is not enabled
Diffstat (limited to 'core/lostpassword')
-rw-r--r--core/lostpassword/controller.php8
-rw-r--r--core/lostpassword/templates/lostpassword.php4
2 files changed, 6 insertions, 6 deletions
diff --git a/core/lostpassword/controller.php b/core/lostpassword/controller.php
index 9377de5d39a..2f996365219 100644
--- a/core/lostpassword/controller.php
+++ b/core/lostpassword/controller.php
@@ -8,11 +8,11 @@
class OC_Core_LostPassword_Controller {
protected static function displayLostPasswordPage($error, $requested) {
- $encrypted = OC_App::isEnabled('files_encryption');
+ $isEncrypted = OC_App::isEnabled('files_encryption');
OC_Template::printGuestPage('core/lostpassword', 'lostpassword',
array('error' => $error,
'requested' => $requested,
- 'encrypted' => $encrypted));
+ 'isEncrypted' => $isEncrypted));
}
protected static function displayResetPasswordPage($success, $args) {
@@ -33,7 +33,9 @@ class OC_Core_LostPassword_Controller {
public static function sendEmail($args) {
- if(isset($_POST['noEncryption']) || isset($_POST['continue'])) {
+ $isEncrypted = OC_App::isEnabled('files_encryption');
+
+ if(!$isEncrypted || isset($_POST['continue'])) {
$continue = true;
} else {
$continue = false;
diff --git a/core/lostpassword/templates/lostpassword.php b/core/lostpassword/templates/lostpassword.php
index c082ee977da..43221649043 100644
--- a/core/lostpassword/templates/lostpassword.php
+++ b/core/lostpassword/templates/lostpassword.php
@@ -17,13 +17,11 @@
<input type="text" name="user" id="user" placeholder="" value="" autocomplete="off" required autofocus />
<label for="user" class="infield"><?php print_unescaped($l->t( 'Username' )); ?></label>
<img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
- <?php if ($_['encrypted']): ?>
+ <?php if ($_['isEncrypted']): ?>
<br /><br />
<?php print_unescaped($l->t('Your files seems to be encrypted. If you didn\'t have enabled the recovery key there will be no way to get your data back once the password was resetted. If you are not sure what to do, please contact your administrator first before continue. Do you really want to continue?')); ?><br />
<input type="checkbox" name="continue" value="Yes" />
<?php print_unescaped($l->t('Yes, I really want to reset my password now')); ?><br/><br/>
- <?php else: ?>
- <input type="checkbox" name="noEncryption" value="Yes" checked />
<?php endif; ?>
</p>
<input type="submit" id="submit" value="<?php print_unescaped($l->t('Request reset')); ?>" />