mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
fixed bug with contact and authed user clash (#3685)
If a contact key is set and a user is also logged in. this was causing the account id to be set to that of the contact, not the authed user. broke multi-account setups.
This commit is contained in:
parent
a8c8392f8d
commit
cd2cbadd40
@ -50,7 +50,9 @@ class EntityRequest extends Request
|
|||||||
//Support Client Portal Scopes
|
//Support Client Portal Scopes
|
||||||
$accountId = false;
|
$accountId = false;
|
||||||
|
|
||||||
if(Input::get('account_id'))
|
if($this->user()->account_id)
|
||||||
|
$accountId = $this->user()->account_id;
|
||||||
|
elseif(Input::get('account_id'))
|
||||||
$accountId = Input::get('account_id');
|
$accountId = Input::get('account_id');
|
||||||
elseif($contact = Contact::getContactIfLoggedIn())
|
elseif($contact = Contact::getContactIfLoggedIn())
|
||||||
$accountId = $contact->account->id;
|
$accountId = $contact->account->id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user