From 319884689a3908ecbc16a0bedd2531c0de41fbf8 Mon Sep 17 00:00:00 2001 From: Raphael Jackstadt Date: Sun, 31 May 2015 17:49:52 +0200 Subject: [PATCH] added specific error messages for update_user without forgotten password text --- application/language/english/aauth_lang.php | 5 +++++ application/libraries/Aauth.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/application/language/english/aauth_lang.php b/application/language/english/aauth_lang.php index ec28e22..b6b3f3a 100644 --- a/application/language/english/aauth_lang.php +++ b/application/language/english/aauth_lang.php @@ -26,6 +26,11 @@ $lang['aauth_error_password_invalid'] = 'Invalid password'; $lang['aauth_error_username_invalid'] = 'Invalid Username'; $lang['aauth_error_username_required'] = 'Username required'; +// Account update errors +$lang['aauth_error_update_email_exists'] = 'Email address already exists on the system. Please enter a different email address.'; +$lang['aauth_error_update_username_exists'] = "Username already exists on the system. Please enter a different username."; + + // Access errors $lang['aauth_error_no_access'] = 'Sorry, you do not have access to the resource you requested.'; $lang['aauth_error_login_failed_email'] = 'E-mail Address and Password do not match.'; diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 4576cdf..4e47312 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -681,7 +681,7 @@ class Aauth { if ($email != FALSE) { if ($this->user_exsist_by_email($email)) { - $this->error($this->CI->lang->line('aauth_error_email_exists')); + $this->error($this->CI->lang->line('aauth_error_update_email_exists')); $valid = FALSE; } if (!valid_email($email)){ @@ -701,7 +701,7 @@ class Aauth { if ($name != FALSE) { if ($this->user_exsist_by_name($name)) { - $this->error($this->CI->lang->line('aauth_error_username_exists')); + $this->error($this->CI->lang->line('aauth_error_update_username_exists')); $valid = FALSE; } if ($name !='' && !ctype_alnum(str_replace($this->config_vars['valid_chars'], '', $name))){