From d9a93a8d689842a9b8b345cf431777022e5996b3 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sun, 1 Sep 2019 12:12:22 +1000 Subject: [PATCH] Include default plugin config --- config/config.php | 11 +++++++++++ models/User.php | 7 +++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 config/config.php diff --git a/config/config.php b/config/config.php new file mode 100644 index 00000000..c24a6828 --- /dev/null +++ b/config/config.php @@ -0,0 +1,11 @@ + 8, +]; diff --git a/models/User.php b/models/User.php index 8e83ea32..22efaf96 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 */