Browse Source

updated UserModel

v3-dev
REJack 6 years ago
parent
commit
08be8d9851
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 6
      application/Models/Aauth/UserModel.php

6
application/Models/Aauth/UserModel.php

@ -89,9 +89,11 @@ class UserModel extends Model
{ {
parent::__construct(); parent::__construct();
print_r($config);
if (is_null($config)) if (is_null($config))
{ {
$config = new \Config\Aauth(); $config = new AauthConfig();
} }
$this->config = $config; $this->config = $config;
@ -120,8 +122,6 @@ class UserModel extends Model
], ],
]; ];
print_r($this->config);
if ($this->config->loginUseUsername) if ($this->config->loginUseUsername)
{ {
$this->validationRules['username'] = 'required|if_exist|is_unique[' . $this->table . '.username,id,{$row->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 . '/]';

Loading…
Cancel
Save