From 31ea2f8d5b85899e5eca3bcd95d8561c827ac49b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 20 Aug 2016 14:19:01 -0700 Subject: [PATCH] Send password email still when random password was generated https://www.virtualmin.com/node/41687 --- email.cgi | 6 ++++-- lang/en | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/email.cgi b/email.cgi index 7590d3f..b7bf0cb 100755 --- a/email.cgi +++ b/email.cgi @@ -270,7 +270,7 @@ elsif ($custommsg) { } elsif ($user) { # Use default Usermin message - $user->{'plainpass'} || + $randpass || $user->{'plainpass'} || &error_and_exit(&text('email_euserpass', $user->{'user'})); my $defemail = &virtual_server::remove_userdom($user->{'user'}, $userd). "\@".$userd->{'dom'}; @@ -284,7 +284,7 @@ elsif ($user) { } elsif ($dom) { # Use default Virtualmin message - $dom->{'pass'} || + $randpass || $dom->{'pass'} || &error_and_exit(&text('email_edompass', $dom->{'user'})); $msg = &text('email_msg', $dom->{'dom'}, $dom->{'user'}, @@ -296,6 +296,8 @@ elsif ($dom) { } elsif ($owner) { # Use default Cloudmin message + $randpass || $owner->{'acl'}->{'plainpass'} || + &error_and_exit(&text('email_eownerpass', $dom->{'user'})); $msg = &text('email_msg2', $owner->{'name'}, $randpass || $owner->{'acl'}->{'plainpass'}, $url, diff --git a/lang/en b/lang/en index b050439..eaee86c 100644 --- a/lang/en +++ b/lang/en @@ -50,6 +50,7 @@ email_done3=The login and password for your Usermin account $2 have been sent to email_failed=Password recovery failed email_eproduct=Neither Virtualmin or Cloudmin is installed, so no accounts for password recovery are available email_edompass=Your virtual server password for login $1 cannot be recovered as it has not been stored by Virtualmin. Please contact your system administrator to reset the password. +email_eownerpass=Your system owner password for login $1 cannot be recovered as it has not been stored by Cloudmin. Please contact your system administrator to reset the password. email_euserpass=Your Usermin password for login $1 cannot be recovered as it has not been stored by Virtualmin. Please contact your system administrator to reset the password. email_return=Return to the login form to use your new password. email_eid=Invalid message ID!