This repository is a user authentication and role management system built with PHP. It provides an easy-to-use admin panel and allows the creation and management of multiple user roles. Security is the top priority in PHP Auth Master, ensuring user data is well-protected.
- 🔹 Multiple User Roles – Easily manage Admin, User, and more.
- 🔹 Admin Panel – Built-in dashboard for role & permission control.
- 🔹 Secure Authentication – Password hashing & session protection.
- 🔹 Role-Based Access – Restrict pages based on user roles.
- 🔹 Auto Menu Generation – Dynamic navigation for admin panel.
- 🔹 Advanced Security – Active session tracking & auto logout on password change.
✅ Secure – Tracks active sessions & prevents unauthorized access.
✅ Easy to Use – Simple admin panel for quick management.
✅ Scalable – Add new roles & users effortlessly.
✅ Real-Time Control – Monitor & remove active sessions anytime.
Creating a menu in the admin panel is super easy! Just define the menu structure, and the system will automatically generate the necessary navigation and pages for you. 🎉
Here’s a simple example:
$menuItems = [
[
"menuTitle" => "Dashboard",
"icon" => "fas fa-tachometer-alt",
"pages" => [
["title" => "Home", "url" => "index.php"]
],
],
[
"menuTitle" => "Settings",
"icon" => "fas fa-cog",
"pages" => [
["title" => "Profile", "url" => "profile.php"],
["title" => "Active Sessions", "url" => "active_sessions.php"]
],
]
];
📌 No need for manual coding—just define your menu items, and the system takes care of the rest! 🚀
Get PHP Auth Master running in just two steps!
git clone https://github.com/Iqbolshoh/php-auth-master.git
cd php-auth-master
mysql -u yourusername -p yourpassword < database.sql
🔹 Replace yourusername
& yourpassword
with your MySQL credentials.
Just edit config.php
to set up the database:
define("DB_SERVER", "localhost");
define("DB_USERNAME", "root");
define("DB_PASSWORD", "");
define("DB_NAME", "auth_master");
🔑 Adding Roles? Just update ROLES
—the system handles the rest! 🚀
const ROLES = [
'admin' => '/admin/',
'user' => '/',
'manager'=>'/manager/' // Add role
];
Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
I love connecting with new people and exploring new opportunities. Feel free to reach out to me through any of the platforms below:
|
|
|
|
|
|
|