Browse Source

added config var for reset_password_link and verification_link, so its not needed to edit the language file

develop
Raphael Jackstadt 10 years ago
parent
commit
f0f781dfca
  1. 6
      application/config/aauth.php
  2. 4
      application/language/english/aauth_lang.php
  3. 4
      application/libraries/Aauth.php

6
application/config/aauth.php

@ -69,7 +69,11 @@ $config['aauth']['login_with_name'] = false;
// system email.
$config['aauth']['email'] = 'admin@admin.com';
$config['aauth']['name'] = 'Emre Akay';
// Link for verification without site_url or base_url
$config['aauth']['verification_link'] = '/account/verification/';
// Link for reset_password without site_url or base_url
$config['aauth']['reset_password_link'] = '/account/reset_password/';
/* End of file aauth.php */
/* Location: ./application/config/aauth.php */

4
application/language/english/aauth_lang.php

@ -5,11 +5,11 @@
// Account verification
$lang['aauth_email_verification_subject'] = 'Account Verification';
$lang['aauth_email_verification_code'] = 'Your verification code is: ';
$lang['aauth_email_verification_link'] = " You can also click on (or copy and paste) the following link\n\nhttp://yourdomain/account/verification/";
$lang['aauth_email_verification_text'] = " You can also click on (or copy and paste) the following link\n\n";
// Password reset
$lang['aauth_email_reset_subject'] = 'Reset Password';
$lang['aauth_email_reset_link'] = "To reset your password click on (or copy and paste in your browser address bar) the link below:\n\nhttp://yourdomain/account/reset_password/";
$lang['aauth_email_reset_text'] = "To reset your password click on (or copy and paste in your browser address bar) the link below:\n\n";
// Password reset success
$lang['aauth_email_reset_success_subject'] = 'Successful Pasword Reset';

4
application/libraries/Aauth.php

@ -455,7 +455,7 @@ class Aauth {
$this->CI->email->from( $this->config_vars['email'], $this->config_vars['name']);
$this->CI->email->to($row->email);
$this->CI->email->subject($this->CI->lang->line('aauth_email_reset_subject'));
$this->CI->email->message($this->CI->lang->line('aauth_email_reset_link') . $row->id . '/' . $ver_code );
$this->CI->email->message($this->CI->lang->line('aauth_email_reset_text') . site_url() . $this->config_vars['reset_password_link'] . $row->id . '/' . $ver_code );
$this->CI->email->send();
}
}
@ -817,7 +817,7 @@ class Aauth {
$this->CI->email->to($row->email);
$this->CI->email->subject($this->CI->lang->line('aauth_email_verification_subject'));
$this->CI->email->message($this->CI->lang->line('aauth_email_verification_code') . $ver_code .
$this->CI->lang->line('aauth_email_verification_link') . $user_id . '/' . $ver_code );
$this->CI->lang->line('aauth_email_verification_text') . site_url() .$this->config_vars['verification_link'] . $user_id . '/' . $ver_code );
$this->CI->email->send();
}
}

Loading…
Cancel
Save