mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 10:17:33 -04:00 
			
		
		
		
	Do not force delete tokens when logging out
This commit is contained in:
		
							parent
							
								
									8f07aa7769
								
							
						
					
					
						commit
						0186368f39
					
				| @ -63,7 +63,11 @@ class LogoutController extends BaseController | |||||||
|         $ct->company |         $ct->company | ||||||
|                     ->tokens() |                     ->tokens() | ||||||
|                     ->where('is_system', true) |                     ->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); |         return response()->json(['message' => 'All tokens deleted'], 200); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -222,8 +222,9 @@ class RequiredClientInfo extends Component | |||||||
|             $this->show_form = true; |             $this->show_form = true; | ||||||
| 
 | 
 | ||||||
|             $hash = Cache::get(request()->input('hash')); |             $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 |         count($this->fields) > 0 || $this->show_terms | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user