From e8c6252a4ce1151b11f1faa8e602c06aae4294d8 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Mon, 3 Oct 2011 20:41:52 +0200 Subject: Move lostpassword to core dir --- core/lostpassword/index.php | 32 +++++++++++++++++++++++++++ core/lostpassword/resetpassword.php | 27 ++++++++++++++++++++++ core/lostpassword/templates/email.php | 1 + core/lostpassword/templates/lostpassword.php | 17 ++++++++++++++ core/lostpassword/templates/resetpassword.php | 14 ++++++++++++ core/templates/login.php | 2 +- 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 core/lostpassword/index.php create mode 100644 core/lostpassword/resetpassword.php create mode 100644 core/lostpassword/templates/email.php create mode 100644 core/lostpassword/templates/lostpassword.php create mode 100644 core/lostpassword/templates/resetpassword.php (limited to 'core') diff --git a/core/lostpassword/index.php b/core/lostpassword/index.php new file mode 100644 index 00000000000..de0d393ec78 --- /dev/null +++ b/core/lostpassword/index.php @@ -0,0 +1,32 @@ +assign('link', $link); + $msg = $tmpl->fetchPage(); + $l = new OC_L10N('core'); + mail($email, $l->t('Owncloud password reset'), $msg); + } + OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => false, 'requested' => true)); + } else { + OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => true, 'requested' => false)); + } +} else { + OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => false, 'requested' => false)); +} diff --git a/core/lostpassword/resetpassword.php b/core/lostpassword/resetpassword.php new file mode 100644 index 00000000000..1c78d720947 --- /dev/null +++ b/core/lostpassword/resetpassword.php @@ -0,0 +1,27 @@ + true)); + } else { + OC_Template::printGuestPage('core/lostpassword', 'resetpassword', array('success' => false)); + } + } else { + OC_Template::printGuestPage('core/lostpassword', 'resetpassword', array('success' => false)); + } +} else { + // Someone lost their password + OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => false, 'requested' => false)); +} diff --git a/core/lostpassword/templates/email.php b/core/lostpassword/templates/email.php new file mode 100644 index 00000000000..d146d8e4c37 --- /dev/null +++ b/core/lostpassword/templates/email.php @@ -0,0 +1 @@ +t('Use the following link to reset your password: {link}')) ?> diff --git a/core/lostpassword/templates/lostpassword.php b/core/lostpassword/templates/lostpassword.php new file mode 100644 index 00000000000..4b871963b80 --- /dev/null +++ b/core/lostpassword/templates/lostpassword.php @@ -0,0 +1,17 @@ +
+
+ t('You will receive a link to reset your password via Email.'); ?> + + t('Requested'); ?> + + + t('Login failed!'); ?> + +

+ + +

+ + +
+
diff --git a/core/lostpassword/templates/resetpassword.php b/core/lostpassword/templates/resetpassword.php new file mode 100644 index 00000000000..56257de7f13 --- /dev/null +++ b/core/lostpassword/templates/resetpassword.php @@ -0,0 +1,14 @@ +
+
+ +

t('Your password was reset'); ?>

+

t('To login page'); ?>

+ +

+ + +

+ + +
+
diff --git a/core/templates/login.php b/core/templates/login.php index 46b44c24d78..aff0afac203 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -1,7 +1,7 @@
- t('Lost your password?'); ?> + t('Lost your password?'); ?>

-- cgit v1.2.3