Download the PHP package riculum/php-auth without Composer
On this page you can find all versions of the php package riculum/php-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download riculum/php-auth
More information about riculum/php-auth
Files in riculum/php-auth
Package php-auth
Short Description A complete user authentication library written in PHP
License MIT
Informations about the package php-auth
PHP-Auth
A complete user authentication library written in PHP
Installation
Use the package manager composer to install the library.
Initial setup
Credentials
The basic database settings can be set through environment variables. Add a .env
file in the root of your project. Make sure the .env
file is added to your .gitignore
so it is not checked-in the code. By default, the library looks for the following variables:
- DB_HOST
- DB_NAME
- DB_USERNAME
- DB_PASSWORD
- DB_PREFIX
More information how to use environment variables here
Database
Note: We recommend to set a database prefix
Configuration
Import vendor/autoload.php and load the .env
settings
Usage
Registration
Use an associative array with user data to register a new user
Login
Verify
Logout
Bugreport & Contribution
If you find a bug, please either create a ticket in github, or initiate a pull request
Versioning
We adhere to semantic (major.minor.patch) versioning (https://semver.org/). This means that:
- Patch (x.x.patch) versions fix bugs
- Minor (x.minor.x) versions introduce new, backwards compatible features or improve existing code.
- Major (major.x.x) versions introduce radical changes which are not backwards compatible.
In your automation or procedure you can always safely update patch & minor versions without the risk of your application failing.