summaryrefslogtreecommitdiff
path: root/includes/view/User_view.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-12-26 13:34:48 +0100
committerPhilip Häusler <msquare@notrademark.de>2013-12-26 13:34:48 +0100
commit0c98f13eee10a61cabdc13e7aa75916d50b8b078 (patch)
treed3931a0b5ffb03e59c3589de5dcfa3910e10bca6 /includes/view/User_view.php
parent3cc147d235bc977aedb660d896cbb54d1a4f92ec (diff)
user password recovery
Diffstat (limited to 'includes/view/User_view.php')
-rw-r--r--includes/view/User_view.php66
1 files changed, 48 insertions, 18 deletions
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index ef4f9831..eda29d58 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -3,25 +3,55 @@
/**
* Available T-Shirt sizes
*/
-$tshirt_sizes = array (
- '' => _("Please select..."),
- 'S' => "S",
- 'M' => "M",
- 'L' => "L",
- 'XL' => "XL",
- '2XL' => "2XL",
- '3XL' => "3XL",
- '4XL' => "4XL",
- '5XL' => "5XL",
- 'S-G' => "S Girl",
- 'M-G' => "M Girl",
- 'L-G' => "L Girl",
- 'XL-G' => "XL Girl"
+$tshirt_sizes = array(
+ '' => _("Please select..."),
+ 'S' => "S",
+ 'M' => "M",
+ 'L' => "L",
+ 'XL' => "XL",
+ '2XL' => "2XL",
+ '3XL' => "3XL",
+ '4XL' => "4XL",
+ '5XL' => "5XL",
+ 'S-G' => "S Girl",
+ 'M-G' => "M Girl",
+ 'L-G' => "L Girl",
+ 'XL-G' => "XL Girl"
);
/**
+ * View for password recovery step 1: E-Mail
+ */
+function User_password_recovery_view() {
+ return page(array(
+ msg(),
+ _("We will send you an e-mail with a password recovery link. Please use the email address you used for registration."),
+ form(array(
+ form_text('email', _("E-Mail"), ""),
+ form_submit('submit', _("Recover"))
+ ))
+ ));
+}
+
+/**
+ * View for password recovery step 2: New password
+ */
+function User_password_set_view() {
+ return page(array(
+ msg(),
+ _("Please enter a new password."),
+ form(array(
+ form_password('password', _("Password")),
+ form_password('password2', _("Confirm password")),
+ form_submit('submit', _("Save"))
+ ))
+ ));
+}
+
+/**
* Render a users avatar.
- * @param User $user
+ *
+ * @param User $user
* @return string
*/
function User_Avatar_render($user) {
@@ -30,16 +60,16 @@ function User_Avatar_render($user) {
/**
* Render a user nickname.
- * @param User $user_source
+ *
+ * @param User $user_source
* @return string
*/
function User_Nick_render($user_source) {
global $user, $privileges;
- if($user['UID'] == $user_source['UID'] || in_array('user_shifts_admin', $privileges))
+ if ($user['UID'] == $user_source['UID'] || in_array('user_shifts_admin', $privileges))
return '<a href="' . page_link_to('user_myshifts') . '&amp;id=' . $user_source['UID'] . '">' . htmlspecialchars($user_source['Nick']) . '</a>';
else
return htmlspecialchars($user_source['Nick']);
}
-
?> \ No newline at end of file