class UserRepository
Methods
Find a user by ID, optionally making sure it is visible to a certain user, or throw an exception.
Find a user by username, optionally making sure it is visible to a certain user, or throw an exception.
Find a user by an identification (username or email).
The unique index limits this to one user until 3.0 (flarum/framework#4426).
Find users by matching a string of words against their username, optionally making sure they are visible to a certain user.
Details
at
line 38
Model
findOrFail(int|string $id, User|null $actor = null)
Find a user by ID, optionally making sure it is visible to a certain user, or throw an exception.
at
line 59
Model
findOrFailByUsername(string $username, User|null $actor = null)
Find a user by username, optionally making sure it is visible to a certain user, or throw an exception.
at
line 73
Model|null
findByIdentification(string $identification)
Find a user by an identification (username or email).
Email addresses may match several accounts from 3.0 (flarum/framework#4426).
at
line 85
Model|null
findByEmail(string $email)
deprecated
deprecated
at
line 95
Collection
findAllByEmail(string $email)
The unique index limits this to one user until 3.0 (flarum/framework#4426).