diff --git a/config/config.php b/config/config.php new file mode 100644 index 0000000..c24a682 --- /dev/null +++ b/config/config.php @@ -0,0 +1,11 @@ + 8, +]; diff --git a/models/User.php b/models/User.php index 8e83ea3..22efaf9 100644 --- a/models/User.php +++ b/models/User.php @@ -26,8 +26,8 @@ class User extends UserBase 'email' => 'required|between:6,255|email|unique:users', 'avatar' => 'nullable|image|max:4000', 'username' => 'required|between:2,255|unique:users', - 'password' => 'required:create|between:' . UserSettings::MIN_PASSWORD_LENGTH_DEFAULT . ',255|confirmed', - 'password_confirmation' => 'required_with:password|between:' . UserSettings::MIN_PASSWORD_LENGTH_DEFAULT . ',255', + 'password' => 'required:create|between:8,255|confirmed', + 'password_confirmation' => 'required_with:password|between:8,255', ]; /** @@ -202,7 +202,7 @@ public function getLoginName() */ public static function getMinPasswordLength() { - return Config::get('min_password_length', 8); + return Config::get('rainlab.user::minPasswordLength', 8); } // @@ -248,7 +248,6 @@ public function beforeValidate() $this->username = $this->email; } - /* * Apply Password Length Settings */