class User extends User

Traits

Notifiable
HasFactory

Properties

string $uuid
Role $role

Methods

setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')

Set a dynamic JSON attribute.

mixed
getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')

Get a dynamic JSON attribute.

array
casts()

Get the attributes that should be cast.

setEmailAttribute(string $value)

Set the email attribute and transform it to lowercase.

Project, $this>
projects()

The projects, this user is a member of.

LabelTree, $this>
labelTrees()

The label trees, this user is a member of.

ApiToken, $this>
apiTokens()

Api tokens of this user.

FederatedSearchModel, $this>
federatedSearchModels()

The federated search models that the user can access

bool
getIsGlobalAdminAttribute()

Determines if the user has the global admin role.

checkCanBeDeleted()

Checks if the user can be deleted.

setSettings(array $settings)

Set settings and merge them with the existing settings.

mixed
getSettings(string $key, mixed $default = null)

Get settings of a specific key.

array|null
getSettingsAttribute()

Get the settings array.

bool
getIsInSuperUserModeAttribute()

Determines if the user is currently in Super User Mode.

setIsInSuperUserModeAttribute(bool $value)

Enables or disables Super User Mode if the user is a global admin.

bool
getCanReviewAttribute()

Determines if the user can review e.g. new user registrations (without being super user).

setCanReviewAttribute(bool $value)

Enables or disables the ability to review.

bool
getHasNoRateLimitAttribute()

Determines if the API rate limit applies to the user.

setHasNoRateLimitAttribute(bool $value)

Enable or disable the API rate limit for (editor) users.

Details

in HasJsonAttributes at line 16
protected setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')

Set a dynamic JSON attribute.

Parameters

string $key

Key of the attribute in the JSON.

mixed $value

Value of the attribute in the JSON.

string $attrs

Name of the JSON column of the model.

in HasJsonAttributes at line 38
protected mixed getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')

Get a dynamic JSON attribute.

Parameters

string $key

Key of the attribute in the JSON.

mixed $default

Default value.

string $attrs

Name of the JSON column of the model.

Return Value

mixed

at line 29
protected array casts()

Get the attributes that should be cast.

Return Value

array

at line 46
setEmailAttribute(string $value)

Set the email attribute and transform it to lowercase.

Parameters

string $value

at line 56
Project, $this> projects()

The projects, this user is a member of.

Return Value

Project, $this>

at line 66
LabelTree, $this> labelTrees()

The label trees, this user is a member of.

Return Value

LabelTree, $this>

at line 76
ApiToken, $this> apiTokens()

Api tokens of this user.

Return Value

ApiToken, $this>

at line 86
FederatedSearchModel, $this> federatedSearchModels()

The federated search models that the user can access

Return Value

FederatedSearchModel, $this>

at line 96
bool getIsGlobalAdminAttribute()

Determines if the user has the global admin role.

Return Value

bool

at line 105
checkCanBeDeleted()

Checks if the user can be deleted.

Throws an exception if not.

at line 125
setSettings(array $settings)

Set settings and merge them with the existing settings.

Parameters

array $settings

at line 144
mixed getSettings(string $key, mixed $default = null)

Get settings of a specific key.

Parameters

string $key
mixed $default

Default value if the settings key was not set

Return Value

mixed

at line 154
array|null getSettingsAttribute()

Get the settings array.

Return Value

array|null

at line 164
bool getIsInSuperUserModeAttribute()

Determines if the user is currently in Super User Mode.

Return Value

bool

at line 173
setIsInSuperUserModeAttribute(bool $value)

Enables or disables Super User Mode if the user is a global admin.

Parameters

bool $value

at line 186
bool getCanReviewAttribute()

Determines if the user can review e.g. new user registrations (without being super user).

Return Value

bool

at line 198
setCanReviewAttribute(bool $value)

Enables or disables the ability to review.

Parameters

bool $value

at line 208
bool getHasNoRateLimitAttribute()

Determines if the API rate limit applies to the user.

Return Value

bool

at line 220
setHasNoRateLimitAttribute(bool $value)

Enable or disable the API rate limit for (editor) users.

Parameters

bool $value