Bristol SU Support Package
|
Public Member Functions | |
all () | |
getFromControlId (int $controlId) | |
create (array $attributes) | |
getWhereEmail ($email) | |
getFromRememberToken (string $token) | |
getById (int $id) | |
setRememberToken (int $id, $token) | |
Handles retrieving and setting users.
Definition at line 13 of file UserRepository.php.
BristolSU\Support\User\UserRepository::all | ( | ) |
Get all users registered in the database
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 21 of file UserRepository.php.
BristolSU\Support\User\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 |
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 49 of file UserRepository.php.
BristolSU\Support\User\UserRepository::getById | ( | int | $id | ) |
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 83 of file UserRepository.php.
Referenced by BristolSU\Support\User\UserRepository\setRememberToken().
BristolSU\Support\User\UserRepository::getFromControlId | ( | int | $controlId | ) |
Get a user matching the given control ID
int | $controlId | Control ID of the user |
ModelNotFoundException |
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 33 of file UserRepository.php.
Referenced by BristolSU\Support\User\UserRepository\getWhereEmail().
BristolSU\Support\User\UserRepository::getFromRememberToken | ( | string | $token | ) |
Get a user by remember token
string | $token | Remember token |
ModelNotFoundException |
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 75 of file UserRepository.php.
BristolSU\Support\User\UserRepository::getWhereEmail | ( | ) |
Get a user matching the given email address
string | Email address of the user |
ModelNotFoundException |
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 61 of file UserRepository.php.
References BristolSU\Support\User\UserRepository\getFromControlId().
BristolSU\Support\User\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 |
Implements BristolSU\Support\User\Contracts\UserRepository.
Definition at line 94 of file UserRepository.php.
References BristolSU\Support\User\UserRepository\getById().