1
0
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:
David Bomba 2020-06-19 07:51:38 +10:00 committed by GitHub
commit ef3c677a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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'));
}

View File

@ -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();
}
}