mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Support extra URL parameters for iframe feature
This commit is contained in:
parent
fb1a42c838
commit
7a152e8877
@ -69,7 +69,7 @@ class ClientPortalController extends BaseController
|
||||
|
||||
$account->loadLocalizationSettings($client);
|
||||
|
||||
if (! Input::has('phantomjs') && ! session('silent') && ! Session::has($invitationKey)
|
||||
if (! Input::has('phantomjs') && ! session('silent') && ! Session::has($invitation->invitation_key)
|
||||
&& (! Auth::check() || Auth::user()->account_id != $invoice->account_id)) {
|
||||
if ($invoice->isType(INVOICE_TYPE_QUOTE)) {
|
||||
event(new QuoteInvitationWasViewed($invoice, $invitation));
|
||||
@ -78,7 +78,7 @@ class ClientPortalController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
Session::put($invitationKey, true); // track this invitation has been seen
|
||||
Session::put($invitation->invitation_key, true); // track this invitation has been seen
|
||||
Session::put('contact_key', $invitation->contact->contact_key); // track current contact
|
||||
|
||||
$invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date);
|
||||
|
@ -104,6 +104,9 @@ class Authenticate
|
||||
*/
|
||||
protected function getInvitation($key)
|
||||
{
|
||||
// check for extra params at end of value (from website feature)
|
||||
list($key) = explode('&', $key);
|
||||
|
||||
$invitation = Invitation::withTrashed()->where('invitation_key', '=', $key)->first();
|
||||
if ($invitation && ! $invitation->is_deleted) {
|
||||
return $invitation;
|
||||
|
@ -827,6 +827,9 @@ class InvoiceRepository extends BaseRepository
|
||||
*/
|
||||
public function findInvoiceByInvitation($invitationKey)
|
||||
{
|
||||
// check for extra params at end of value (from website feature)
|
||||
list($invitationKey) = explode('&', $invitationKey);
|
||||
|
||||
/** @var \App\Models\Invitation $invitation */
|
||||
$invitation = Invitation::where('invitation_key', '=', $invitationKey)->first();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user