Support Generic Users#207
Conversation
196e099 to
4043812
Compare
|
Seems a bit hacky to use refection to get at attributes. Does that class not provide a public interface? |
1 similar comment
|
Seems a bit hacky to use refection to get at attributes. Does that class not provide a public interface? |
|
I went with this approach because the generic user is a run on magic methods. Short of guessing what attribute keys are used this seemed the best approach which would work no matter how you modelled the generic user. I also thought as this only runs during an error report it was not too much of a technical cost. If you have any ideas on a better approach I am happy to rewrite. |
4043812 to
6651abf
Compare
|
@GrahamCampbell any thoughts |
|
We should probably also check if |
|
Ok, I've made that change. I think this looks good now. 👍 |
|
A remark for other reviewers: PHP does not attempt to load classes in an instanceof check, so it doesn't matter if we do an instanceof check of a class that isn't known about. |
|
Thanks |
When using the database auth driver in Laravel the generic user does not have a
toArray()method. Resulting in a white screen of death.Leaving with the options
However, I feel enough users must experience this out of the box and just get a white screen.
I have used reflection which seems less than ideal but open to ideas.