Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.52 KB

getting_started.md

File metadata and controls

50 lines (34 loc) · 1.52 KB

Auther - PHP

Auther documentation for PHP.

Installation

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.

Getting Started

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 List

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.

Support

Auther supports PHP version 5.6 and up.