final class AlterRegistration
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

ALTER USER [IF EXISTS] account n FACTOR {INITIATE REGISTRATION | FINISH REGISTRATION SET CHALLENGE_RESPONSE AS '…' | UNREGISTER} (8.0.27+).

Mirrors the registration flags of LEX_MFA. Rule: MYSQL-ALTER-REGISTRATION-001. The challenge response is an operand with its exact value. A factor number other than 2 or 3 is reported (MYSQL-ACCOUNT-NUMBER-001). Source: https://dev.mysql.com/doc/refman/8.4/en/alter-user.html#alter-user-registration. Status: Implemented.

Starting the registration of a devicedoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('alter user user() 2 factor initiate registration')->toString() // => 'ALTER USER USER() 2 FACTOR INITIATE REGISTRATION'

Properties§

public bool $ifExists
public Numeral $factor
public Text|null $challengeResponse = null

Methods§

public function __construct(
    public bool $ifExists,
    public Account|SessionUser $user,
    public Numeral $factor,
    public RegistrationStep $step,
    public Text|null $challengeResponse = null,
)

Parameters

$ifExistsboolWhether IF EXISTS is written
$userAccount|SessionUserThe account
$factorNumeralThe factor number as written
$stepRegistrationStepThe registration step
$challengeResponseText|nullThe challenge response of FINISH REGISTRATION
Calls 2
public function deriveStatement(Derivation $derivation): void

Reports a factor number the server rejects.

Parameters

$derivationDerivation
Calls 2
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 5

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 3
Type declarations 1