mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Expand verify password routine.
This commit is contained in:
@@ -284,14 +284,18 @@ class FireflyValidator extends Validator
|
||||
*/
|
||||
public function validateSecurePassword($attribute, $value, $parameters): bool
|
||||
{
|
||||
$enabled = env('PASSWORD_SERVICE');
|
||||
if (!$enabled) {
|
||||
return true;
|
||||
$verify = false;
|
||||
if (isset($this->data['verify_password'])) {
|
||||
$verify = intval($this->data['verify_password']) === 1;
|
||||
}
|
||||
/** @var Verifier $service */
|
||||
$service = app(Verifier::class);
|
||||
if ($verify) {
|
||||
/** @var Verifier $service */
|
||||
$service = app(Verifier::class);
|
||||
|
||||
return $service->validPassword($value);
|
||||
return $service->validPassword($value);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user