Browse Source

added specific error messages for update_user without forgotten password text

develop
Raphael Jackstadt 10 years ago
parent
commit
319884689a
  1. 5
      application/language/english/aauth_lang.php
  2. 4
      application/libraries/Aauth.php

5
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_invalid'] = 'Invalid Username';
$lang['aauth_error_username_required'] = 'Username required'; $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 // Access errors
$lang['aauth_error_no_access'] = 'Sorry, you do not have access to the resource you requested.'; $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.'; $lang['aauth_error_login_failed_email'] = 'E-mail Address and Password do not match.';

4
application/libraries/Aauth.php

@ -681,7 +681,7 @@ class Aauth {
if ($email != FALSE) { if ($email != FALSE) {
if ($this->user_exsist_by_email($email)) { 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; $valid = FALSE;
} }
if (!valid_email($email)){ if (!valid_email($email)){
@ -701,7 +701,7 @@ class Aauth {
if ($name != FALSE) { if ($name != FALSE) {
if ($this->user_exsist_by_name($name)) { 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; $valid = FALSE;
} }
if ($name !='' && !ctype_alnum(str_replace($this->config_vars['valid_chars'], '', $name))){ if ($name !='' && !ctype_alnum(str_replace($this->config_vars['valid_chars'], '', $name))){

Loading…
Cancel
Save