ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ChangeMailStatus.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\User\Profile;
22 
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  }
49 }
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...