classFactorChange
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.
$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::DropProperties§
public list<FactorStep> $stepspublic Account $userpublic FactorAction $actionMethods§
public function __construct(
public Account $user,
public FactorAction $action,
list<FactorStep> $steps,
)Parameters
$user | Account | The account |
$action | FactorAction | What is done to each factor |
$steps | list<FactorStep> | The changed factors in order; one or two |
Calls 5
- static-call Check::listOf() line 43
- class-const FactorStep::class() line 43
- static-call Check::input() line 44
- function-call
countline 44 - class-const FactorAction::Drop() line 46
public function render(Output $out): voidWrites the account and each change.
Parameters
$out | Output |
Calls 2
- method-call Output::node() line 55
- method-call Output::keyword() line 57
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
FactorChangeTestcalls