Merge pull request #9516 from CarrnellTech/v5-develop

Redirect client to dashboard at login if enabled -fix #9417 #9501
This commit is contained in:
David Bomba 2024-05-14 07:50:18 +10:00 committed by GitHub
commit 501464e2db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,7 +161,9 @@ class ContactKeyLogin
private function setRedirectPath()
{
if (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
if (auth()->guard('contact')->user()->client->getSetting('enable_client_portal_dashboard') === true) {
return '/client/dashboard';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
return '/client/invoices';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
return '/client/recurring_invoices';