mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Derp. Check and make sure that setting is actually on
This commit is contained in:
parent
c4b2ef5660
commit
63bb2de4d4
|
@ -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'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue