[guadec-web] lost password reset message



commit 30d0c7b7eb13f5f898beed1b109068ac8ad92708
Author: Andreas Nilsson <anilsson redhat com>
Date:   Thu Mar 21 14:49:39 2013 -0300

    lost password reset message

 wordcamp-base/custom/custom.php |   56 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/wordcamp-base/custom/custom.php b/wordcamp-base/custom/custom.php
index 3fc05b9..3551603 100644
--- a/wordcamp-base/custom/custom.php
+++ b/wordcamp-base/custom/custom.php
@@ -138,4 +138,60 @@ function my_admin_bar_render() {
 add_action( 'wp_before_admin_bar_render', 'my_admin_bar_render' );
 
 
+/*--------------------------------------------------------------------------------------
+ *
+ *     password reset message
+ *
+ *-------------------------------------------------------------------------------------*/
+
+add_filter ("retrieve_password_title", "my_reset_password_title");
+
+function my_reset_password_title() {
+       return "[GUADEC 2013] Your password reset";
+}
+
+       
+add_filter ("retrieve_password_message", "my_reset_password_message");
+function my_reset_password_message($content, $key) {
+       global $wpdb;
+       $user_login = $wpdb->get_var("SELECT user_login FROM $wpdb->users WHERE user_activation_key = 
'$key'");
+       
+       ob_start();
+       
+       $email_subject = imp_retrieve_password_title();
+       
+       ?>
+       
+       <html>
+               <head>
+                       <title>Your password reset for GUADEC 2013</title>
+               </head>
+
+               <body>
+                       <p>
+                               It looks like you want to reset your password for your GUADEC 2013 account.
+                       </p>
+                       
+                       <p>
+                               To reset your password, visit the following address, otherwise just ignore 
this email and nothing will happen. <br>
+                               <?php echo wp_login_url("url") ?>?action=rp&key=<?php echo $key 
?>&login=<?php echo $user_login ?>
+                       </p>
+                       
+                       <p>
+                               Cheers,
+                               The GUADEC 2013 Team
+                       </p>
+               </body>
+       </html>
+       
+       ?>
+       
+       $message = ob_get_contents();
+
+       ob_end_clean();
+  
+       return $message;
+}
+
+
 ?>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]