final class UpdateUserCommand (View source)

What a partial user update asks for: every field is null when the request left it alone. The controllers build it from their own field names; the service hands it on to the repository with the password in its stored form.

Methods

__construct(string|null $username = null, string|null $password = null, string|null $fullname = null, string|null $email = null, string|null $description = null, bool|null $active = null, int|null $permissionTemplateId = null, bool|null $useLdap = null, bool|null $useRemoteUser = null)

No description

AuthMethod|null
authMethodAfter(AuthMethod $current)

The sign-in method the account carries after this update, or null when the request leaves it alone. Turning a flag off keeps an OIDC or SAML account as it is.

bool
passwordGiven()

Whether the request sets a password; "0" is a password, an empty string is not.

withPassword(string $password)

The same request with the password replaced by its stored form (hash or LDAP placeholder).

Details

__construct(string|null $username = null, string|null $password = null, string|null $fullname = null, string|null $email = null, string|null $description = null, bool|null $active = null, int|null $permissionTemplateId = null, bool|null $useLdap = null, bool|null $useRemoteUser = null)

No description

Parameters

string|null $username

A new login name; an empty one is refused by the service

string|null $password

A new plain password; null (and an empty string) leaves it unchanged

string|null $fullname
string|null $email
string|null $description
bool|null $active
int|null $permissionTemplateId

A positive template id to assign

bool|null $useLdap

Whether the account should authenticate against LDAP

bool|null $useRemoteUser

Whether the web server should sign the account in

AuthMethod|null authMethodAfter(AuthMethod $current)

The sign-in method the account carries after this update, or null when the request leaves it alone. Turning a flag off keeps an OIDC or SAML account as it is.

Parameters

AuthMethod $current

Return Value

AuthMethod|null

bool passwordGiven()

Whether the request sets a password; "0" is a password, an empty string is not.

Return Value

bool

UpdateUserCommand withPassword(string $password)

The same request with the password replaced by its stored form (hash or LDAP placeholder).

Parameters

string $password

Return Value

UpdateUserCommand