Browse Source

fix login update

main
Aaron Parecki 1 year ago
parent
commit
228152d4c8
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      compass/app/Http/Controllers/IndieAuth.php

+ 3
- 1
compass/app/Http/Controllers/IndieAuth.php View File

@ -164,7 +164,9 @@ class IndieAuth extends BaseController
// Create the user record if it doesn't exist yet
$user = DB::table('users')->where('url','=',$url)->first();
if($user) {
DB::update('UPDATE users SET last_login = ?', [date('Y-m-d H:i:s')]);
DB::table('users')->where('id', $user->id)->update([
'last_login' => date('Y-m-d H:i:s')
]);
session(['user_id' => $user->id]);
} else {
$user_id = DB::table('users')->insertGetId([

Loading…
Cancel
Save