|
|
@ -100,7 +100,7 @@ class UserModel extends Model |
|
|
|
|
|
|
|
|
|
|
|
$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,{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,{id}]|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,{id}]|regex_match[/' . $this->config->userRegexPattern . '/]'; |
|
|
|
|
|
|
|
|
|
|
|
$this->validationMessages['username']['required'] = lang('Aauth.requiredUsername'); |
|
|
|
$this->validationMessages['username']['required'] = lang('Aauth.requiredUsername'); |
|
|
|
} |
|
|
|
} |
|
|
|