@@ 83-92 (lines=10) @@ | ||
80 | * |
|
81 | * @return string[]|null |
|
82 | */ |
|
83 | private function getAccessLevels($email) |
|
84 | { |
|
85 | foreach ($this->hostedDomains as $hostedDomain) { |
|
86 | if (preg_match('/' . $hostedDomain['domain_name'] . '$/', $email)) { |
|
87 | return $hostedDomain['access_levels']; |
|
88 | } |
|
89 | } |
|
90 | ||
91 | return null; |
|
92 | } |
|
93 | ||
94 | /** |
|
95 | * This method returns wether a domain for the given email has been configured |
|
@@ 101-110 (lines=10) @@ | ||
98 | * |
|
99 | * @return bool |
|
100 | */ |
|
101 | private function isConfiguredDomain($email) |
|
102 | { |
|
103 | foreach ($this->hostedDomains as $hostedDomain) { |
|
104 | if (preg_match('/' . $hostedDomain['domain_name'] . '$/', $email)) { |
|
105 | return true; |
|
106 | } |
|
107 | } |
|
108 | ||
109 | return false; |
|
110 | } |
|
111 | } |
|
112 |