dev-master
9999999-dev https://github.com/avryhof/authAuthentication class similar to Pear Auth
MIT
The Requires
- php >=5.0.0
by Amos Vryhof
authentication auth pear
Authentication class similar to Pear Auth
An Authentication Class similar to Pear Auth ( http://pear.php.net/package/Auth/ ), (*1)
This class was created primarily because when I try to use pear/auth, composer fires a bunch of dependency issues I don't want to resolve. It is also designed to be lighter, and have less requirements than pear/auth, while maintaining somcompatible APIs., (*2)
```php require_once("auth.php"); or require("vendor/autoload.php"), (*3)
$auth_options = array( "dsn" => "mysqli://".$dsn, "table" => "users", "usernamecol" => "email", "passwordcol" => "password", "db_fields" => array("id","name") ); $auth = new Auth("Database", $auth_options, "", false);, (*4)
$auth->start();, (*5)
if (!$auth->checkAuth()) { header("Location:".$baseurl."/login.php"); }, (*6)
Authentication class similar to Pear Auth
MIT
authentication auth pear