Skip to content

Commit

Permalink
added specific error messages for update_user without forgotten passw…
Browse files Browse the repository at this point in the history
…ord text
  • Loading branch information
REJack committed May 31, 2015
1 parent 7617a79 commit 3198846
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions application/language/english/aauth_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
$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.';
Expand Down
4 changes: 2 additions & 2 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ public function update_user($user_id, $email = FALSE, $pass = FALSE, $name = FAL

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)){
Expand All @@ -701,7 +701,7 @@ public function update_user($user_id, $email = FALSE, $pass = FALSE, $name = FAL

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))){
Expand Down

0 comments on commit 3198846

Please sign in to comment.