| @@ 60-66 (lines=7) @@ | ||
| 57 | } |
|
| 58 | } |
|
| 59 | ||
| 60 | public function setEnabled($commonName) |
|
| 61 | { |
|
| 62 | $disableFile = sprintf('%s/%s', $this->disableDir, $commonName); |
|
| 63 | if (false === @unlink($disableFile)) { |
|
| 64 | throw new RuntimeException(sprintf('unable to delete file "%s"', $disableFile)); |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| 68 | private static function createDir($dirName) |
|
| 69 | { |
|
| @@ 69-75 (lines=7) @@ | ||
| 66 | return @file_exists($disableFile); |
|
| 67 | } |
|
| 68 | ||
| 69 | public function setDisabled($userId) |
|
| 70 | { |
|
| 71 | $disableFile = sprintf('%s/%s', $this->disableDir, $userId); |
|
| 72 | if (false === @file_put_contents($disableFile, time())) { |
|
| 73 | throw new RuntimeException(sprintf('unable to write file "%s"', $disableFile)); |
|
| 74 | } |
|
| 75 | } |
|
| 76 | ||
| 77 | public function setEnabled($userId) |
|
| 78 | { |
|
| @@ 77-83 (lines=7) @@ | ||
| 74 | } |
|
| 75 | } |
|
| 76 | ||
| 77 | public function setEnabled($userId) |
|
| 78 | { |
|
| 79 | $disableFile = sprintf('%s/%s', $this->disableDir, $userId); |
|
| 80 | if (false === @unlink($disableFile)) { |
|
| 81 | throw new RuntimeException(sprintf('unable to delete file "%s"', $disableFile)); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| 85 | public function setOtpSecret($userId, $otpSecret) |
|
| 86 | { |
|