mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
This commit is contained in:
@@ -184,6 +184,12 @@ class UserEventHandler
|
||||
$ipAddress = $event->ipAddress;
|
||||
$list = app('preferences')->getForUser($user, 'login_ip_history', [])->data;
|
||||
|
||||
// see if user has alternative email address:
|
||||
$pref = app('preferences')->getForUser($user, 'remote_guard_alt_email', null);
|
||||
if (null !== $pref) {
|
||||
$email = $pref->data;
|
||||
}
|
||||
|
||||
/** @var array $entry */
|
||||
foreach ($list as $index => $entry) {
|
||||
if (false === $entry['notified']) {
|
||||
@@ -300,6 +306,12 @@ class UserEventHandler
|
||||
$uri = route('index');
|
||||
$ipAddress = $event->ipAddress;
|
||||
|
||||
// see if user has alternative email address:
|
||||
$pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email', null);
|
||||
if (null !== $pref) {
|
||||
$email = $pref->data;
|
||||
}
|
||||
|
||||
// send email.
|
||||
try {
|
||||
Mail::to($email)->send(new RegisteredUserMail($uri, $ipAddress));
|
||||
|
Reference in New Issue
Block a user