Role Based Access Control PHP Framework is my personal PHP script in order to develop a rapid system/application mainly focusing on login and verify user access control process. this php script equipped with md5 hashing for small scale system (you may used any type of hashing you desired). This script already has the required file structure to jumpstart you system development.
Explaination of the columns in the users table
- id : unique value of the user data
- email : email of the user
- password : password of the user (MD5 Hash)
- name : name of the user
- userType : type of the user. determined by Int such as 1 for admin, 2 for user , 3 for accountant
- PHP 5+
- MySQL
- import the rbac.sql into your mysql database.
- Copy all the project items
- The file structure is easy to use and understand. admin, user and accountant is the type of the user in your system.
- configure the database credentials and configuration details in the 'includes/config.php'
- if there's no user available in the database, run this sql below
INSERT INTO `user` (`id`, `email`, `password`, `name`, `userType`) VALUES
(57, 'admin@email.com', 'ee11cbb19052e40b07aac0ca060c23ee', 'Muhammad Farid', 1),
(58, 'user@email.com', 'ee11cbb19052e40b07aac0ca060c23ee', 'Muhammad Farid', 2,),
(59, 'accountant@email.com', 'ee11cbb19052e40b07aac0ca060c23ee', 'Muhammad Farid', 3);
- Bootstrap 4 - Bootstrap 4
- SweetAlert - Beautiful Alert library