A free open source IT asset/license management system
Derp. Check and make sure that setting is actually on
snipe63bb2de4d4d5
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.phpindex ae283cd25a..140c73ab26 100755--- a/app/Http/Controllers/ProfileController.php+++ b/app/Http/Controllers/ProfileController.php@@ -165,15 +165,20 @@ class ProfileController extends Controller// There may be a more elegant way to do this in the future.- if (($request->input('password') == $user->username) ||- ($request->input('password') == $user->email) ||- ($request->input('password') == $user->first_name) ||- ($request->input('password') == $user->last_name))- {- $validator->errors()->add('password', trans('validation.disallow_same_pwd_as_user_fields'));+ // First let's see if that option is enabled in the settings+ if (strpos(Setting::passwordComplexityRulesSaving('store'), 'disallow_same_pwd_as_user_fields')) {+ \Log::debug('disallow_same_pwd_as_user_fields is ON');+ if (($request->input('password') == $user->username) ||+ ($request->input('password') == $user->email) ||+ ($request->input('password') == $user->first_name) ||+ ($request->input('password') == $user->last_name))+ {+ $validator->errors()->add('password', trans('validation.disallow_same_pwd_as_user_fields'));+ }}+});