mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-22 00:03:09 +01:00
Fix query to return the user even if userId > 0
This commit is contained in:
parent
4d6ae849d8
commit
cff545d936
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user