kopia lustrzana https://github.com/magicbug/Cloudlog
back to plain text email
rodzic
b5ebad2db8
commit
194793e3ae
|
@ -834,13 +834,14 @@ class User extends CI_Controller {
|
|||
// Generate password reset code 50 characters long
|
||||
$this->load->helper('string');
|
||||
$reset_code = random_string('alnum', 50);
|
||||
$user_first_name = $data->user_firstname;
|
||||
$this->user_model->set_password_reset_code(($data->user_email), $reset_code);
|
||||
|
||||
// Send email with reset code and first Name of the User
|
||||
|
||||
$this->data['reset_code'] = $reset_code;
|
||||
$this->data['user_first_name'] = $user_first_name; // We can call the user by his first name in the E-Mail
|
||||
$this->data['user_firstname'] = $data->user_firstname; // We can call the user by his first name in the E-Mail
|
||||
$this->data['user_callsign'] = $data->user_callsign;
|
||||
$this->data['user_name'] = $data->user_name;
|
||||
$this->load->library('email');
|
||||
|
||||
if($this->optionslib->get_option('emailProtocol') == "smtp") {
|
||||
|
@ -862,7 +863,6 @@ class User extends CI_Controller {
|
|||
|
||||
$this->email->from($this->optionslib->get_option('emailAddress'), $this->optionslib->get_option('emailSenderName'));
|
||||
$this->email->to($data->user_email);
|
||||
$this->email->set_mailtype("html");
|
||||
$this->email->subject('Cloudlog Account Password Reset');
|
||||
$this->email->message($message);
|
||||
|
||||
|
|
|
@ -1,24 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Password Reset</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello <?php echo $user_first_name; ?>,</p>
|
||||
|
||||
<p>An admin initiated a password reset for your Cloudlog account.</p>
|
||||
|
||||
<p>Click <a href="<?php echo site_url('user/reset_password/').$reset_code; ?>">here</a> to reset your password.</p>
|
||||
Hello <?php echo $user_firstname . ", " . $user_callsign ?>
|
||||
|
||||
<p>Or copy this link into a browser:
|
||||
<?php echo site_url('user/reset_password/').$reset_code; ?></p>
|
||||
|
||||
<p>If you didn't request any password reset, just ignore this email and talk to an admin of your Cloudlog instance.</p>
|
||||
|
||||
<p>Regards,<br>
|
||||
Cloudlog</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
An admin initiated a password reset for your Cloudlog account.
|
||||
|
||||
Your username is: <?php echo $user_name; ?>
|
||||
|
||||
|
||||
Click here to reset your password: <?php echo site_url('user/reset_password/').$reset_code; ?>
|
||||
|
||||
|
||||
If you didn't request any password reset, just ignore this email and talk to an admin of your Cloudlog instance.
|
||||
|
||||
Regards,
|
||||
Cloudlog
|
||||
|
|
Ładowanie…
Reference in New Issue