User
class User extends AbstractUser
Properties
| mixed | $id | The unique identifier for the user. |
from AbstractUser |
| string|null | $nickname | The user's nickname / username. |
from AbstractUser |
| string|null | $name | The user's full name. |
from AbstractUser |
| string|null | The user's e-mail address. |
from AbstractUser | |
| string|null | $avatar | The user's avatar image URL. |
from AbstractUser |
| array | $user | The user's raw attributes. |
from AbstractUser |
| array | $attributes | The user's other attributes. |
from AbstractUser |
| string|null | $token | The user's access token. |
|
| string|null | $refreshToken | The refresh token that can be exchanged for a new access token. |
|
| int|null | $expiresIn | The number of seconds the access token is valid for. |
|
| array | $approvedScopes | The scopes the user authorized. The approved scopes may be a subset of the requested scopes. |
|
| array | $accessTokenResponseBody | The complete access token response. |
Methods
Map the given array onto the user's properties.
Determine if the given raw user attribute exists.
Set the given attribute on the raw user array.
Set the refresh token required to obtain a new access token.
Set the number of seconds the access token is valid for.
Set the scopes that were approved by the user during authentication.
Set the complete access token response on the user.
Details
in
AbstractUser at line 50
mixed
getId()
Get the unique identifier for the user.
in
AbstractUser at line 58
string|null
getNickname()
Get the nickname / username for the user.
in
AbstractUser at line 66
string|null
getName()
Get the full name of the user.
in
AbstractUser at line 74
string|null
getEmail()
Get the e-mail address of the user.
in
AbstractUser at line 82
string|null
getAvatar()
Get the avatar / image URL for the user.
in
AbstractUser at line 90
array
getRaw()
Get the raw user array.
in
AbstractUser at line 100
AbstractUser
setRaw(array $user)
Set the raw user array from the provider.
in
AbstractUser at line 112
AbstractUser
map(array $attributes)
Map the given array onto the user's properties.
in
AbstractUser at line 128
bool
offsetExists(mixed $offset)
Determine if the given raw user attribute exists.
in
AbstractUser at line 136
mixed
offsetGet(mixed $offset)
Get the given key from the raw user.
in
AbstractUser at line 144
void
offsetSet(mixed $offset, mixed $value)
Set the given attribute on the raw user array.
in
AbstractUser at line 152
void
offsetUnset(mixed $offset)
Unset the given value from the raw user array.
in
AbstractUser at line 160
mixed
__get(string $key)
Get a user attribute value dynamically.
at line 40
static User
fake(array $attributes = [])
Create a fake OAuth 2 user instance.
at line 68
User
setToken(string|null $token)
Set the token on the user.
at line 80
User
setRefreshToken(string|null $refreshToken)
Set the refresh token required to obtain a new access token.
at line 92
User
setExpiresIn(int|null $expiresIn)
Set the number of seconds the access token is valid for.
at line 104
User
setApprovedScopes(array $approvedScopes)
Set the scopes that were approved by the user during authentication.
at line 116
User
setAccessTokenResponseBody(array $accessTokenResponseBody)
Set the complete access token response on the user.