mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
More code for #456
This commit is contained in:
parent
3e3c48314f
commit
ffca4b0543
@ -92,9 +92,18 @@ class RegisterController extends Controller
|
||||
// is user email domain blocked?
|
||||
if ($this->isBlockedDomain($data['email'])) {
|
||||
$validator->getMessageBag()->add('email', (string)trans('validation.invalid_domain'));
|
||||
|
||||
$this->reportBlockedDomainRegistrationAttempt($data['email'], $request->ip());
|
||||
$this->throwValidationException($request, $validator);
|
||||
}
|
||||
|
||||
// is user a deleted user?
|
||||
$hash = hash('sha256', $data['email']);
|
||||
$configuration = FireflyConfig::get('deleted_users', []);
|
||||
$set = $configuration->data;
|
||||
if (in_array($hash, $set)) {
|
||||
// user already deleted, cannot re-register :(
|
||||
$validator->getMessageBag()->add('email', (string)trans('validation.deleted_user'));
|
||||
$this->reportBlockedDomainRegistrationAttempt($data['email'], $request->ip());
|
||||
$this->throwValidationException($request, $validator);
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
return [
|
||||
'iban' => 'This is not a valid IBAN.',
|
||||
'unique_account_number_for_user' => 'It looks like this account number is already in use.',
|
||||
'deleted_user' => 'Due to security constraints, you cannot register using this email address.',
|
||||
'rule_trigger_value' => 'This value is invalid for the selected trigger.',
|
||||
'rule_action_value' => 'This value is invalid for the selected action.',
|
||||
'invalid_domain' => 'Due to security constraints, you cannot register from this domain.',
|
||||
|
Loading…
Reference in New Issue
Block a user