mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Do not force delete tokens when logging out
This commit is contained in:
parent
8f07aa7769
commit
0186368f39
@ -63,8 +63,12 @@ class LogoutController extends BaseController
|
||||
$ct->company
|
||||
->tokens()
|
||||
->where('is_system', true)
|
||||
->forceDelete();
|
||||
|
||||
->cursor()
|
||||
->each(function ($ct){
|
||||
$ct->token = \Illuminate\Support\Str::random(64);
|
||||
$ct->save();
|
||||
});
|
||||
|
||||
return response()->json(['message' => 'All tokens deleted'], 200);
|
||||
}
|
||||
}
|
||||
|
@ -222,8 +222,9 @@ class RequiredClientInfo extends Component
|
||||
$this->show_form = true;
|
||||
|
||||
$hash = Cache::get(request()->input('hash'));
|
||||
$invoice = Invoice::find($this->decodePrimaryKey($hash['invoice_id']));
|
||||
|
||||
$this->invoice_terms = Invoice::find($this->decodePrimaryKey($hash['invoice_id']))->terms;
|
||||
$this->invoice_terms = $invoice->terms;
|
||||
}
|
||||
|
||||
count($this->fields) > 0 || $this->show_terms
|
||||
|
Loading…
x
Reference in New Issue
Block a user