mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #4023
This commit is contained in:
parent
4fa92ed5f7
commit
647c9c5eb0
@ -61,11 +61,10 @@ class HomeController extends Controller
|
|||||||
$mainTitleIcon = 'fa-hand-spock-o';
|
$mainTitleIcon = 'fa-hand-spock-o';
|
||||||
$email = auth()->user()->email;
|
$email = auth()->user()->email;
|
||||||
$pref = app('preferences')->get('remote_guard_alt_email', null);
|
$pref = app('preferences')->get('remote_guard_alt_email', null);
|
||||||
if(null !== $pref) {
|
if(null !== $pref && is_string($pref->data)) {
|
||||||
$email = $pref->data;
|
$email = $pref->data;
|
||||||
}
|
}
|
||||||
|
Log::debug('Email is ', [$email]);
|
||||||
|
|
||||||
|
|
||||||
return view('admin.index', compact('title', 'mainTitleIcon','email'));
|
return view('admin.index', compact('title', 'mainTitleIcon','email'));
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ class RemoteUserGuard implements Guard
|
|||||||
|
|
||||||
// store email address if present in header and not already set.
|
// store email address if present in header and not already set.
|
||||||
$header = config('auth.guard_email');
|
$header = config('auth.guard_email');
|
||||||
$emailAddress = request()->server($header) ?? null;
|
$emailAddress = (string) (request()->server($header) ?? null);
|
||||||
$preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email', null);
|
$preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email', null);
|
||||||
|
|
||||||
if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) {
|
if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) {
|
||||||
|
Loading…
Reference in New Issue
Block a user