Derp. Check and make sure that setting is actually on
This commit is contained in:
parent
c4b2ef5660
commit
63bb2de4d4
1 changed files with 11 additions and 6 deletions
|
@ -165,6 +165,9 @@ 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.
|
||||||
|
|
||||||
|
// 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) ||
|
if (($request->input('password') == $user->username) ||
|
||||||
($request->input('password') == $user->email) ||
|
($request->input('password') == $user->email) ||
|
||||||
($request->input('password') == $user->first_name) ||
|
($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'));
|
$validator->errors()->add('password', trans('validation.disallow_same_pwd_as_user_fields'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue