Don't allow login if user is pending or rejected; some refactoring of the registration code

This commit is contained in:
Nabeel Shahzad
2017-12-22 13:38:24 -06:00
parent 161623c85e
commit 1ebf2bd09c
8 changed files with 119 additions and 16 deletions

View File

@@ -11,14 +11,16 @@ namespace App\Models\Enums;
class PilotState extends EnumBase
{
const PENDING = 1;
const ACTIVE = 2;
const PENDING = 0;
const ACTIVE = 1;
const REJECTED = 2;
const ON_LEAVE = 3;
const SUSPENDED = 4;
protected static $labels = [
PilotState::PENDING => 'Pending',
PilotState::ACTIVE => 'Active',
PilotState::REJECTED => 'Rejected',
PilotState::ON_LEAVE => 'On Leave',
PilotState::SUSPENDED => 'Suspended',
];