Closed Tofandel closed 6 months ago
Hi @Tofandel, that's already possible using twill.models.user
: https://github.com/area17/twill/blob/3b5d66f870fbc46ad67a53e5b61f86711619a144/config/models.php#L12
I see thanks, there is still a few remnants of User::class though especially in the belongsTo
of revisions and roles
I have noted 97+ usages of the User class in the code, so I'll send in a PR to fix this
Summary
We need to provide an option to be able to override the
Twill\User
class, it would make it possible to provide a customgetAuthIdentifier
for sessions to work correctly without requiring a morph (otherwise if we have multiple User models and guards, the default laravel session which only usesuser_id
has an overlap of id which causes user to be able to see the sessions of other users) or override other behaviors like usingUUID
instead ofID
It would also allow us to add fillable fields to users
Describe the solution you'd like
A new config option:
twill.user_model
defaulting toTwill\User