Table of Contents

Class VerificationFailureTicket

Namespace
FishMMO.Database.Npgsql.Services
Assembly
FishMMO-DB.dll

Counts an incorrect verification code, and opens a support ticket for the account when the count reaches FailedCodesBeforeTicket.

public static class VerificationFailureTicket
Inheritance
VerificationFailureTicket
Inherited Members

Remarks

Shared by the login server and the Control Panel, which both accept codes, and counted in the database, so three wrong codes open a ticket wherever they were typed.

The ticket is filed as the account itself, so the player can follow it from /tickets and the panel, and the player can read everything in it. The body therefore says what state delivery is in without repeating the email address, the phone number or the code.

It is opened once the count reaches the threshold, unless the account already has one open, so a player who keeps guessing does not open a ticket per guess. It used to open only when the count equalled the threshold exactly, so a ticket that failed to open on the third wrong code was never opened at all: the fourth and later never equal three (issue #267). An account unknown to the database, or already verified, counts nothing.

Fields

Subject

The ticket's subject line.

public const string Subject = "Account verification: three incorrect codes"

Field Value

string

Methods

BuildBody(AccountAdminData?)

The ticket body: what happened, and where each chosen channel's delivery stands. Readable by the player.

public static string BuildBody(AccountAdminData? account)

Parameters

account AccountAdminData

Returns

string

RecordAsync(IAccountService, ISupportTicketService?, string, CancellationToken)

Counts one incorrect code against the account, and opens the ticket when it is due.

public static Task<VerificationFailureTicket.Outcome> RecordAsync(IAccountService accounts, ISupportTicketService? tickets, string accountName, CancellationToken cancellationToken = default)

Parameters

accounts IAccountService

The account service.

tickets ISupportTicketService

The support ticket service, or null to count without ticketing.

accountName string

The account the code was entered for.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<VerificationFailureTicket.Outcome>