neutronstars / authentification
Authentification library for php
1.0.0
2021-01-15 22:47 UTC
Requires
- php: >=7.4.0
This package is auto-updated.
Last update: 2024-10-16 20:36:38 UTC
README
<?php require_once __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php'; use NeutronStars\Authentification\User; $user = User::init('user', ['username', 'email']); //Check if your user is connected: if($user->isConnected()) { //Your code } //Connect your user: $user->connect([ 'username' => 'John Doe', 'email' => 'john.doe@email.com' ]); //Disconnected your user without destroy all data in session: $user->disconnect(); //Disconnected your user with the destroy all data in session: $user->disconnect(true);
Installation
composer require neutronstars/authentification
{ "require": { "neutronstars/authentification": ">=1.0.0" } }