Closed BenRutlandWeb closed 3 years ago
How would the new model be hydrated? Some ongoing work regarding Models #48 #50 will make it possible to return a User
model however I don't know how a custom model could be used. Perhaps the user
method should return an interface so any custom implementations should implement that.
I need to look at what and how Laravel implements this.
Is your feature request related to a problem? Please describe. The
AuthManager::user
method only returns aWP_User
. I want to return a custom class instead.Describe the solution you'd like Config to set the type of model returned by the
AuthManager
like how Laravel works.Additional context Laravel let's you choose what model to return from the auth facade so the framework should have the option as the
WP_User
model isn't great.