final class FactorChange
    implements UserAlteration
    uses Snapshot
Public API: explicitly declared with @visibility public.

user ADD|MODIFY|DROP n FACTOR … [ADD|MODIFY|DROP m FACTOR …]: an ALTER USER change of authentication factors.

Mirrors the add_factor, modify_factor and drop_factor flags of LEX_MFA. One or two factors are changed with the same action; ADD and MODIFY give each factor a method, DROP gives none. Naming the same factor twice (ER_MFA_METHODS_IDENTICAL) or adding 3 before 2 (ER_MFA_METHODS_INVALID_ORDER) is reported by the statement. Source: https://dev.mysql.com/doc/refman/8.4/en/alter-user.html#alter-user-multifactor.

Dropping the second factordoctest
$change = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER USER u DROP 2 FACTOR')->statement->users[0];
    $change->action // => \SqlSemantics\Platform\MySql\Statement\Account\User\FactorAction::Drop

Properties§

public list<FactorStep> $steps
public Account $user
public FactorAction $action

Methods§

public function __construct(
    public Account $user,
    public FactorAction $action,
    list<FactorStep> $steps,
)

Parameters

$userAccountThe account
$actionFactorActionWhat is done to each factor
$stepslist<FactorStep>The changed factors in order; one or two
Calls 5
public function render(Output $out): void

Writes the account and each change.

Parameters

$outOutput
Calls 2

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 1
Type declarations 2