Skip to content

UUID user_type and user_id store error #955

Closed Answered by parallels999
aytsystems asked this question in Q&A
Discussion options

You must be logged in to vote

I set the variables manually just for testing

$morphPrefix . '_id' => auth()->user()->id,
$morphPrefix . '_type' => 'App\Models\User',

And it worked!
then noticed that the functions $user->getAuthIdentifier() and $user->getMorphClass() it's not working for me.

return Auth::guard($guard)->user();

User resolver returns auth()->user()
Illuminate/Contracts/Auth/Guard.php#L24-L26 user() returns Illuminate/Auth/Authenticatable.php
and Illuminate/Auth/Authenticatable.php has getAuthIdentifier

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by parallels999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
no feedback Feedback not provided
3 participants
Converted from issue

This discussion was converted from issue #918 on July 10, 2024 22:25.