class UserCommandFactory (View source)

Turns a user create or update request, keyed by the API field names, into the typed command UserManagementService takes. A value of the wrong shape is refused here with the same wording and refusal the service used to give.

Methods

static CreateUserCommand|array
create(array $input, bool $useRemoteUser = false)

No description

static UpdateUserCommand|array
update(array $input, bool|null $useRemoteUser = null)

No description

static bool
passwordGiven(array $input)

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

Details

static CreateUserCommand|array create(array $input, bool $useRemoteUser = false)

No description

Parameters

array $input

The request fields under their API names

bool $useRemoteUser

Web server sign-in, which only the web form offers so far

Return Value

CreateUserCommand|array

static UpdateUserCommand|array update(array $input, bool|null $useRemoteUser = null)

No description

Parameters

array $input

The request fields under their API names; absent ones stay unchanged

bool|null $useRemoteUser

Web server sign-in, which only the web form offers so far; null leaves it unchanged

Return Value

UpdateUserCommand|array

static bool passwordGiven(array $input)

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

Parameters

array $input

Return Value

bool