UsersRepository
class UsersRepository
Class UsersRepository is used to search and retrieve DvsUser models and things in context of a Devise User.
Properties
| array | $errors | Errors are kept in an array and can be used later if validation fails and we want to know why | |
| string | $message | This is a message that we can store why validation failed |
Methods
__construct(DvsUser $DvsUser, Framework $Framework)
Construct a new users repository
DvsUser
retrieveCurrentUser()
Retrieve currently logged-in user object
Integer
retrieveCurrentUserId()
Retrieve current user id
DvsUser
findById(int $id)
Find user by id
Collection
users()
Paginated list of users
DvsUser
findByEmail(string $email)
Find user by email field
DvsUser
findByName(string $name)
Find user by name field
DvsUser
findByUsername(string $username)
Find user by name field
Details
at line 48
__construct(DvsUser $DvsUser, Framework $Framework)
Construct a new users repository
at line 59
DvsUser
retrieveCurrentUser()
Retrieve currently logged-in user object
at line 69
Integer
retrieveCurrentUserId()
Retrieve current user id
at line 80
DvsUser
findById(int $id)
Find user by id
at line 90
Collection
users()
Paginated list of users
at line 101
DvsUser
findByEmail(string $email)
Find user by email field
at line 112
DvsUser
findByName(string $name)
Find user by name field
at line 123
DvsUser
findByUsername(string $username)
Find user by name field