leonardorrc / nlogin-composer
Synchronize nLogin accounts on your website using composer!
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 4
pkg:composer/leonardorrc/nlogin-composer
Requires
- php: >=8.0
This package is auto-updated.
Last update: 2025-12-16 22:31:51 UTC
README
Integrate nLogin with your website, forum and/or store.
Usage:
Instantiation
require 'nLogin.php'; // Creates an instance $nlogin = new nLogin("localhost", "root", "", "nlogin", false);
Verifying the Password
require 'nLogin.php'; // Creates an instance $nlogin = new nLogin("localhost", "root", "", "nlogin", false); // Fetches the user identifier (search, mode) $user_id = $nlogin->fetch_user_id("Player", nLogin::FETCH_WITH_LAST_NAME); // Verifies the password $is_valid = $nlogin->verify_password($user_id, "password123");
Registering a Player
require 'nLogin.php'; // Creates an instance $nlogin = new nLogin("localhost", "root", "", "nlogin", false); // Fetches the user identifier (search, mode) $user_id = $nlogin->fetch_user_id("Player", nLogin::FETCH_WITH_LAST_NAME); // Registers a player (username, plain password, e-mail, unique id (optional), mojang id (optional), bedrock id (optional)) $success = $nlogin->register($user_id, "password123", 'youremail@domain.com', null, null, null);
Changing the Password
require 'nLogin.php'; // Creates an instance $nlogin = new nLogin("localhost", "root", "", "nlogin", false); // Fetches the user identifier (search, mode) $user_id = $nlogin->fetch_user_id("Player", nLogin::FETCH_WITH_LAST_NAME); // Changes the password (user identifier, new plain password) $success = $nlogin->change_password($user_id, "newpassword123");
License
This code or part of it was taken from the AuthMe project, licensed under the GNU General Public License v3.0 (https://github.com/AuthMe/AuthMeReloaded/blob/master/LICENSE)
For more details, access the original source code:
https://github.com/AuthMe/AuthMeReloaded/tree/master/samples/website_integration
Node.js
If you use Node.js, take a look at the work done by tiagodinis33: https://gitlab.com/tiagodinis33/nlogin-js