ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Status.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27enum Status: int
28{
29 public const VALIDITY_LOGIN = 300;
30
31 case Login = 0;
32 case EmailConfirmation = 1;
33
34 public function next(): self
35 {
36 return match($this) {
37 self::Login => self::EmailConfirmation,
38 default => throw new \Exception('There is no next step')
39 };
40 }
41
42 public function getValidity(\ilSetting $settings): int
43 {
44 return match($this) {
45 self::Login => self::VALIDITY_LOGIN,
46 self::EmailConfirmation => max((int) $settings->get('reg_hash_life_time'), \ilRegistrationSettings::REG_HASH_LIFETIME_MIN_VALUE)
47 };
48 }
ILIAS Setting Class.
get(string $a_keyword, ?string $a_default_value=null)
get setting
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...