Oihana PHP System

InvitationStatus uses ConstantsTrait

Defines the materialized state of the latest invitation associated with a User account.

This value is stored directly on the User document (field invitationStatus) for cheap filtering and sorting on the admin users list — avoiding an AQL sub-query against the invitations collection on every read.

Conceptually mirrors a subset of schema.org's ActionStatusType but with finer-grained semantics required by the application: expired and cancelled would both collapse into FailedActionStatus upstream, losing UX information. The matching is roughly:

  • none ↔ no invitation ever sent (user created dormant)
  • pending ↔ ActionStatusType::ActiveActionStatus
  • accepted ↔ ActionStatusType::CompletedActionStatus
  • expired ↔ ActionStatusType::FailedActionStatus (timeout)
  • cancelled ↔ ActionStatusType::FailedActionStatus (admin)

The Invitation document itself uses schema.org actionStatus on the row directly; this enum is for the user-side projection only.

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.2

Table of Contents

Constants

ACCEPTED  : string = 'accepted'
The invitation has been consumed at the user's first successful login.
CANCELLED  : string = 'cancelled'
The invitation was soft-cancelled by an admin (DELETE).
EXPIRED  : string = 'expired'
The invitation reached `endTime` without being consumed.
NONE  : string = 'none'
The user account was created without dispatching an invitation.
PENDING  : string = 'pending'
An invitation has been sent and is awaiting acceptance.

Constants

ACCEPTED

The invitation has been consumed at the user's first successful login.

public string ACCEPTED = 'accepted'

CANCELLED

The invitation was soft-cancelled by an admin (DELETE).

public string CANCELLED = 'cancelled'

EXPIRED

The invitation reached `endTime` without being consumed.

public string EXPIRED = 'expired'

NONE

The user account was created without dispatching an invitation.

public string NONE = 'none'

Only an admin re-invite or password-reset can move it forward.

PENDING

An invitation has been sent and is awaiting acceptance.

public string PENDING = 'pending'
On this page

Search results