Conditions | 5 |
Paths | 4 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public static function authenticate() |
||
27 | { |
||
28 | //if there is no username or password, fail |
||
29 | if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { |
||
30 | return null; |
||
31 | } |
||
32 | |||
33 | // With a valid user and password, check the password is correct |
||
34 | $data = [ |
||
35 | 'Email' => $_SERVER['PHP_AUTH_USER'], |
||
36 | 'Password' => $_SERVER['PHP_AUTH_PW'], |
||
37 | ]; |
||
38 | $request = Controller::curr()->getRequest(); |
||
39 | $authenticators = Security::singleton()->getApplicableAuthenticators(Authenticator::LOGIN); |
||
40 | $member = null; |
||
41 | foreach ($authenticators as $authenticator) { |
||
42 | $member = $authenticator->authenticate($data, $request); |
||
43 | if ($member) { |
||
44 | break; |
||
45 | } |
||
46 | } |
||
47 | return $member; |
||
48 | } |
||
50 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths