|
|
@ -98,9 +98,9 @@ class UserModel extends Model |
|
|
|
$this->table = $this->config->dbTableUsers; |
|
|
|
$this->table = $this->config->dbTableUsers; |
|
|
|
$this->DBGroup = $this->config->dbProfile; |
|
|
|
$this->DBGroup = $this->config->dbProfile; |
|
|
|
|
|
|
|
|
|
|
|
$this->validationRules['email'] = 'required|if_exist|valid_email|is_unique[' . $this->table . '.email,id,{$id}]'; |
|
|
|
$this->validationRules['email'] = 'required|if_exist|valid_email|is_unique[' . $this->table . '.email,id,{$row->id}]'; |
|
|
|
$this->validationRules['password'] = 'required|if_exist|min_length[' . $this->config->passwordMin . ']|max_length[' . $this->config->passwordMax . ']'; |
|
|
|
$this->validationRules['password'] = 'required|if_exist|min_length[' . $this->config->passwordMin . ']|max_length[' . $this->config->passwordMax . ']'; |
|
|
|
$this->validationRules['username'] = 'if_exist|is_unique[' . $this->table . '.username,id,{$id}]|min_length[3]|regex_match[/' . $this->config->userRegexPattern . '/]'; |
|
|
|
$this->validationRules['username'] = 'if_exist|is_unique[' . $this->table . '.username,id,{$row->id}]|min_length[3]|regex_match[/' . $this->config->userRegexPattern . '/]'; |
|
|
|
|
|
|
|
|
|
|
|
$this->validationMessages = [ |
|
|
|
$this->validationMessages = [ |
|
|
|
'email' => [ |
|
|
|
'email' => [ |
|
|
@ -122,7 +122,7 @@ class UserModel extends Model |
|
|
|
|
|
|
|
|
|
|
|
if ($this->config->loginUseUsername) |
|
|
|
if ($this->config->loginUseUsername) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->validationRules['username'] = 'required|if_exist|is_unique[' . $this->table . '.username,id,{$id}]|min_length[3]|regex_match[/' . $this->config->userRegexPattern . '/]'; |
|
|
|
$this->validationRules['username'] = 'required|if_exist|is_unique[' . $this->table . '.username,id,{$row->id}]|min_length[3]|regex_match[/' . $this->config->userRegexPattern . '/]'; |
|
|
|
|
|
|
|
|
|
|
|
$this->validationMessages['username']['required'] = lang('Aauth.requiredUsername'); |
|
|
|
$this->validationMessages['username']['required'] = lang('Aauth.requiredUsername'); |
|
|
|
} |
|
|
|
} |
|
|
|