Skip to content

Commit

Permalink
added config var for reset_password_link and verification_link, so it…
Browse files Browse the repository at this point in the history
…s not needed to edit the language file
  • Loading branch information
REJack committed May 26, 2015
1 parent 7c749af commit f0f781d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion application/config/aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
// 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 changes: 2 additions & 2 deletions application/language/english/aauth_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public function remind_password($email){
$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();
}
}
Expand Down Expand Up @@ -817,7 +817,7 @@ public function send_verification($user_id){
$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();
}
}
Expand Down

0 comments on commit f0f781d

Please sign in to comment.