mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge pull request #3817 from turbo124/v2
Update last logged in for client contact
This commit is contained in:
commit
ef3c677a05
@ -11,6 +11,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Events\Contact\ContactLoggedIn;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\ClientContact;
|
||||
use Auth;
|
||||
@ -62,6 +63,8 @@ class ContactLoginController extends Controller
|
||||
{
|
||||
Auth::guard('contact')->login($client, true);
|
||||
|
||||
event(new ContactLoggedIn($client));
|
||||
|
||||
if (session()->get('url.intended')) {
|
||||
return redirect(session()->get('url.intended'));
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ class UpdateContactLastLogin implements ShouldQueue
|
||||
$client_contact = $event->client_contact;
|
||||
|
||||
$client_contact->last_login = now();
|
||||
$client_contact->client->last_login = now();
|
||||
|
||||
$client_contact->save();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user