mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-07-11 09:55:09 +02:00
Fix query to return the user even if userId > 0
This commit is contained in:
@ -33,9 +33,9 @@ class RegisterController extends Controller
|
||||
*/
|
||||
public function checkUser()
|
||||
{
|
||||
$username = DB::table('users')->where('id', 1)->value('name');
|
||||
$user = DB::table('users')->first();
|
||||
|
||||
return response()->json(['username' => $username], 200);
|
||||
return response()->json(['username' => isset($user->name) ? $user->name : null], 200);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user