|
|
@@ -88,18 +88,23 @@ if (!empty($_POST['ok'])) {
|
|
|
// Send email to the new user
|
|
|
if ((empty($_SESSION['error_msg'])) && (!empty($v_notify))) {
|
|
|
$to = $_POST['v_notify'];
|
|
|
- $subject = _("Welcome to Hestia Control Panel"); //currently not supported to use the account language
|
|
|
+ // send email in "users" language
|
|
|
+ putenv("LANGUAGE=".$_POST['v_language']);
|
|
|
+
|
|
|
+ $subject = _("Welcome to Hestia Control Panel");
|
|
|
$hostname = exec('hostname');
|
|
|
unset($output);
|
|
|
- $from = sprintf(_('MAIL_FROM'),$hostname); //currently not supported to use the account language
|
|
|
+ $from = sprintf(_('MAIL_FROM'),$hostname); /
|
|
|
|
|
|
if (!empty($_POST['v_name'])) {
|
|
|
$mailtext = sprintf(_('GREETINGS_GORDON'),$_POST['v_name'])."\r\n";
|
|
|
} else {
|
|
|
$mailtext = _('GREETINGS')."\r\n";
|
|
|
}
|
|
|
+
|
|
|
$mailtext .= sprintf(_('ACCOUNT_READY'),$_SERVER['HTTP_HOST'],$_POST['v_username'],$_POST['v_password']);
|
|
|
send_email($to, $subject, $mailtext, $from);
|
|
|
+ putenv("LANGUAGE=".detect_user_language());
|
|
|
}
|
|
|
|
|
|
// Flush field values on success
|