Auther documentation for PHP.
Auther is available on Packagist (using semantic versioning), and installation via Composer is the recommended way to install Auther. Just add this line to your composer.json
file:
"auther/auther": "~1.0"
or run
composer require auther/auther
Note that the vendor
folder and the vendor/autoload.php
script are generated by Composer; they are not part of Auther.
If you do not already have your database setup start with the beginners guide
// Instantiate the Auther class
$auther = new Auther();
// Authenticate a user
$authenticate = $auther->authenticate($user, $password);
// Get authenticated user
$authenticated = $Auther->getAuthenticated();
Methods | Description |
---|---|
authenticate() | Authenticates a user. |
unauthenticate() | Unauthenticates a user |
getAuthenticated() | Returns currently authenticated user information. |
startSession() | Starts a new session. |
endSession() | Ends current session. |
addUser() | Adds a new user to the database table specified. |
deleteUser() | Deletes a user from the database table specified. |
Auther supports PHP version 5.6
and up.