mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Redirect client to dashboard at login if enabled
This commit is contained in:
parent
ac7d8b40fa
commit
ba0eec48a0
@ -165,7 +165,9 @@ class ContactLoginController extends Controller
|
|||||||
|
|
||||||
private function setRedirectPath()
|
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) {
|
||||||
|
$this->redirectTo = '/client/dashboard';
|
||||||
|
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
|
||||||
$this->redirectTo = '/client/invoices';
|
$this->redirectTo = '/client/invoices';
|
||||||
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
|
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
|
||||||
$this->redirectTo = '/client/recurring_invoices';
|
$this->redirectTo = '/client/recurring_invoices';
|
||||||
|
@ -64,7 +64,9 @@ class ContactHashLoginController extends Controller
|
|||||||
|
|
||||||
private function setRedirectPath()
|
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';
|
return '/client/invoices';
|
||||||
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
|
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
|
||||||
return '/client/recurring_invoices';
|
return '/client/recurring_invoices';
|
||||||
|
@ -161,7 +161,9 @@ class ContactKeyLogin
|
|||||||
|
|
||||||
private function setRedirectPath()
|
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';
|
return '/client/invoices';
|
||||||
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
|
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
|
||||||
return '/client/recurring_invoices';
|
return '/client/recurring_invoices';
|
||||||
|
Loading…
Reference in New Issue
Block a user