Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
29 | public function isAllowedToUseSecondFactorOnlyFor($nameId) |
||
30 | { |
||
31 | if (empty($nameId)) { |
||
32 | return false; |
||
33 | } |
||
34 | |||
35 | if (!$this->mayUseSecondFactorOnly()) { |
||
36 | return false; |
||
37 | } |
||
38 | |||
39 | $nameIdPatterns = $this->get('secondFactorOnlyNameIdPatterns'); |
||
40 | foreach ($nameIdPatterns as $nameIdPattern) { |
||
41 | if (fnmatch($nameIdPattern, $nameId)) { |
||
42 | return true; |
||
43 | } |
||
44 | } |
||
45 | return false; |
||
46 | } |
||
47 | } |
||
48 |