There are 3 web projects. The server part is in PHP, the interface is HTML / JS. For data, each project uses a separate MySQL database. And each project uses user authorization. User data is stored as follows:
1st project: - a table in the Users database "user_id", "login", "md5password"
------------------------------ | 1 | admin | alskdjalsdja23das | | 2 | user | asdasdasqweqwreds32 | ------------------------------ 2nd project: - Normal Apache BASE authorization - user data is stored in a .htaccess / .htpasswd file
3rd project: - table in the Users database: "user_id", "login", "md5password"
----------------------------- | 1 | moderator | aasdf21321a23das | | 2 | writer | asdasda456225fs32 | ----------------------------- rights table for different Rights: "right_id", "description"
----------------------------- | 1 | read | | 2 | write | | 3 | delete | ----------------------------- Users_Rights user rights assignment table: "user_id", "right_id"
----------------------------- | 1 | 1 | | 1 | 2 | | 1 | 3 | | 2 | 1 | | 2 | 2 | ----------------------------- How to create a single authorization for all three projects, with its own user management interface.
I think in the second project to apply mod_auth_mysql to use MySQL. But then it is not clear how to be with the uniqueness of users. Create prefixes for tables? Generally a dead end.