You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We implement a User::exists($value, $identifier = 'user_name', $checkDeleted = true), which overrides the base exists method in Builder.
This can lead to confusion though, because the signatures of the two methods are different, and they operate on different assumptions. User::exists is implicitly generating a where query, whereas Builder::exists simply determines whether or not the current query returns any results.
The fix for this would be to rename User::exists to something else. We could also implement this at the level of Model, rather than just for the User class.
The text was updated successfully, but these errors were encountered:
Ok, I've addressed this in v4.1.7 (e5f5487) by deprecating the User::exists method and replacing it with the findUnique method for all models. We can't get rid of User::exists right away as some people may be depending on it.
We implement a
User::exists($value, $identifier = 'user_name', $checkDeleted = true)
, which overrides the baseexists
method in Builder.This can lead to confusion though, because the signatures of the two methods are different, and they operate on different assumptions.
User::exists
is implicitly generating awhere
query, whereasBuilder::exists
simply determines whether or not the current query returns any results.The fix for this would be to rename
User::exists
to something else. We could also implement this at the level ofModel
, rather than just for theUser
class.The text was updated successfully, but these errors were encountered: