Bristol SU Support Package
|
Public Member Functions | |
getWhereEmail ($email) | |
getFromControlId (int $controlId) | |
create (array $attributes) | |
all () | |
getFromRememberToken (string $token) | |
getById (int $id) | |
setRememberToken (int $id, $token) | |
Handle creating and retrieving users from the database
Definition at line 12 of file UserRepository.php.
BristolSU\Support\User\Contracts\UserRepository::all | ( | ) |
Get all users registered in the database
Implemented in BristolSU\Support\User\UserRepository.
BristolSU\Support\User\Contracts\UserRepository::create | ( | array | $attributes | ) |
Create a user.
Attributes should be those in the database [ 'control_id' => 1, // ID of the control user model representing the user ];
array | $attributes | Attributes to create the user with |
Implemented in BristolSU\Support\User\UserRepository.
BristolSU\Support\User\Contracts\UserRepository::getById | ( | int | $id | ) |
Get a user by ID
int | $id | ID of the user |
ModelNotFoundException |
Implemented in BristolSU\Support\User\UserRepository.
BristolSU\Support\User\Contracts\UserRepository::getFromControlId | ( | int | $controlId | ) |
Get a user matching the given control ID
int | $controlId | Control ID of the user |
Implemented in BristolSU\Support\User\UserRepository.
BristolSU\Support\User\Contracts\UserRepository::getFromRememberToken | ( | string | $token | ) |
Get a user by remember token
string | $token | Remember token |
ModelNotFoundException |
Implemented in BristolSU\Support\User\UserRepository.
BristolSU\Support\User\Contracts\UserRepository::getWhereEmail | ( | ) |
Get a user matching the given email address.
string | Email address of the user |
Implemented in BristolSU\Support\User\UserRepository.
BristolSU\Support\User\Contracts\UserRepository::setRememberToken | ( | int | $id, |
$token | |||
) |
Set the remember token of a user
int | $id | ID of the user |
mixed | $token | New token for the user |
Implemented in BristolSU\Support\User\UserRepository.