# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /var/www/sites/all/modules/_modified/account_reminder
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: account_reminder.module
--- account_reminder.module Base (BASE)
+++ account_reminder.module Locally Modified (Based On LOCAL)
@@ -118,7 +118,16 @@
     '#default_value' => _account_reminder_mail_text('account_reminder_msg'),
     '#description' => t('Customize the body of the account reminder email. Valid variables are !site, !username, !login_uri, !login_url (the one time login link), !unsubscribe_url (A URL allowing users to opt-out of recieving the reminder emails) and !password.'),
   );
-
+    $form['reset'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Reset initial password'),
+    ) ;
+    $form['reset']['account_reminder_reset_pass'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Reset password'),
+    '#default_value' => variable_get('account_reminder_reset_pass', 1),
+    '#description' => t("If you want to include the plain-text password in the welcome email, you will need to reset the user's previous password. <br/><strong>Important:</strong> The user will no longer be able to use the password or login url sent in previous emails."),
+  );
   return system_settings_form($form);
 }
 
@@ -237,12 +246,17 @@
  */
 function account_reminder_send_email($user) {
   $context = $headers = array();
-
+  //if reset password is cheked in setting configuration:
+  if(variable_get('account_reminder_reset_pass',1)){
   // Assign the user a new password because we do not know the old one!!!
   $pass = user_password();
   user_save($user, array('pass' => $pass));
   $user->pass = md5($pass);
   $context['pass'] = $pass;
+  }
+  else{
+      $context['pass']="[Password not displayed]";
+  }
 
   $context['unsubscribe_url'] = account_reminder_unsubscribe_url($user);
   $context['subject'] = _account_reminder_mail_text('account_reminder_subject');
