Derp. Check and make sure that setting is actually on

This commit is contained in:
snipe 2020-11-02 20:13:54 -08:00
parent c4b2ef5660
commit 63bb2de4d4

View file

@ -165,15 +165,20 @@ class ProfileController extends Controller
// There may be a more elegant way to do this in the future. // There may be a more elegant way to do this in the future.
if (($request->input('password') == $user->username) || // First let's see if that option is enabled in the settings
($request->input('password') == $user->email) || if (strpos(Setting::passwordComplexityRulesSaving('store'), 'disallow_same_pwd_as_user_fields')) {
($request->input('password') == $user->first_name) || \Log::debug('disallow_same_pwd_as_user_fields is ON');
($request->input('password') == $user->last_name)) if (($request->input('password') == $user->username) ||
{ ($request->input('password') == $user->email) ||
$validator->errors()->add('password', trans('validation.disallow_same_pwd_as_user_fields')); ($request->input('password') == $user->first_name) ||
($request->input('password') == $user->last_name))
{
$validator->errors()->add('password', trans('validation.disallow_same_pwd_as_user_fields'));
}
} }
}); });