From f0f781dfca8c8848068cd186616069d4b2efe367 Mon Sep 17 00:00:00 2001 From: Raphael Jackstadt Date: Tue, 26 May 2015 17:59:00 +0200 Subject: [PATCH] added config var for reset_password_link and verification_link, so its not needed to edit the language file --- application/config/aauth.php | 6 +++++- application/language/english/aauth_lang.php | 4 ++-- application/libraries/Aauth.php | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/application/config/aauth.php b/application/config/aauth.php index 3a0cda6..c1061be 100644 --- a/application/config/aauth.php +++ b/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 */ diff --git a/application/language/english/aauth_lang.php b/application/language/english/aauth_lang.php index 2af947b..ec28e22 100644 --- a/application/language/english/aauth_lang.php +++ b/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'; diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 6049aa6..c762e07 100644 --- a/application/libraries/Aauth.php +++ b/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(); } }