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,6 +165,9 @@ class ProfileController extends Controller
// There may be a more elegant way to do this in the future.
// 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) ||
@ -172,6 +175,8 @@ class ProfileController extends Controller
{
$validator->errors()->add('password', trans('validation.disallow_same_pwd_as_user_fields'));
}
}