class User extends User

Traits

Notifiable
HasFactory

Properties

protected array $hidden

The attributes hidden from the model's JSON form.

from  User
protected array $casts

The attributes that should be casted to native types.

from  User

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.

setEmailAttribute(string $value)

Set the email attribute and transform it to lowercase.

from  User
BelongsToMany
projects()

The projects, this user is a member of.

from  User
BelongsToMany
labelTrees()

The label trees, this user is a member of.

from  User
BelongsTo
role()

The global role of this user.

from  User
HasMany
apiTokens()

Api tokens of this user.

from  User
BelongsToMany
federatedSearchModels()

The federated search models that the user can access

from  User
bool
getIsGlobalAdminAttribute()

Determines if the user has the global admin role.

from  User
checkCanBeDeleted()

Checks if the user can be deleted.

from  User
setSettings(array $settings)

Set settings and merge them with the existing settings.

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

Get settings of a specific key.

from  User
array|null
getSettingsAttribute()

Get the settings array.

from  User
bool
getIsInSuperUserModeAttribute()

Determines if the user is currently in Super User Mode.

from  User
setIsInSuperUserModeAttribute(bool $value)

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

from  User
bool
getCanReviewAttribute()

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

from  User
setCanReviewAttribute(bool $value)

Enables or disables the ability to review.

from  User
static User
convert(User $model)

Converts a regular user to an user storage user.

int
getStorageQuotaAvailableAttribute()

Get the available storage quota of the user in bytes.

setStorageQuotaAvailableAttribute($value)

Set the allowed user storage quota.

int
getStorageQuotaUsedAttribute()

Get the used storage quota of the user in bytes.

int
getStorageQuotaRemainingAttribute()

Get the remaining storage quota of the user in bytes.

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

in User at line 45
setEmailAttribute(string $value)

Set the email attribute and transform it to lowercase.

Parameters

string $value

in User at line 55
BelongsToMany projects()

The projects, this user is a member of.

Return Value

BelongsToMany

in User at line 65
BelongsToMany labelTrees()

The label trees, this user is a member of.

Return Value

BelongsToMany

in User at line 75
BelongsTo role()

The global role of this user.

Return Value

BelongsTo

in User at line 85
HasMany apiTokens()

Api tokens of this user.

Return Value

HasMany

in User at line 95
BelongsToMany federatedSearchModels()

The federated search models that the user can access

Return Value

BelongsToMany

in User at line 105
bool getIsGlobalAdminAttribute()

Determines if the user has the global admin role.

Return Value

bool

in User at line 114
checkCanBeDeleted()

Checks if the user can be deleted.

Throws an exception if not.

in User at line 134
setSettings(array $settings)

Set settings and merge them with the existing settings.

Parameters

array $settings

in User at line 153
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

in User at line 163
array|null getSettingsAttribute()

Get the settings array.

Return Value

array|null

in User at line 173
bool getIsInSuperUserModeAttribute()

Determines if the user is currently in Super User Mode.

Return Value

bool

in User at line 182
setIsInSuperUserModeAttribute(bool $value)

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

Parameters

bool $value

in User at line 195
bool getCanReviewAttribute()

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

Return Value

bool

in User at line 207
setCanReviewAttribute(bool $value)

Enables or disables the ability to review.

Parameters

bool $value

at line 17
static User convert(User $model)

Converts a regular user to an user storage user.

Parameters

User $model

Return Value

User

at line 31
int getStorageQuotaAvailableAttribute()

Get the available storage quota of the user in bytes.

Return Value

int

at line 41
setStorageQuotaAvailableAttribute($value)

Set the allowed user storage quota.

@@param int|null $value

Parameters

$value

at line 51
int getStorageQuotaUsedAttribute()

Get the used storage quota of the user in bytes.

Return Value

int

at line 67
int getStorageQuotaRemainingAttribute()

Get the remaining storage quota of the user in bytes.

Return Value

int