PHP code example of neutronstars / authentification
1. Go to this page and download the library: Download neutronstars/authentification library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
neutronstars / authentification example snippets
eutronStars\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' => '[email protected]'
]);
//Disconnected your user without destroy all data in session:
$user->disconnect();
//Disconnected your user with the destroy all data in session:
$user->disconnect(true);