Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * @file auth.inc.php
5 * @brief Include fragment for setting up authentication class.
6 */
7
8use PHPAuth\Config as PHPAuthConfig;
9use PHPAuth\Auth as PHPAuth;
10
11use Lggr\AuthConfig;
12
13$lggrAuthConfig = new AuthConfig();
14
15$dbh = new PDO("mysql:host=" . $lggrAuthConfig->getDbHost() . ";dbname=" . $lggrAuthConfig->getDbName(), $lggrAuthConfig->getDbUser(), $lggrAuthConfig->getDbPwd());
16
17$authConfig = new PHPAuthConfig($dbh);
18$auth = new PHPAuth($dbh, $authConfig);