User control with permissions in PHP

1

Well, I've got a system developed in PHP with mysql database running and I've been given the task of creating user profiles or a tool for the system administrator to put what he wants the user to see, in java we have Spring security for this task, someone knows a nice solution.

    
asked by anonymous 15.07.2015 / 04:47

1 answer

2

Develop the solution as follows: Have a table of modules ... when registering the user, select which modules he has permission and writes everything to an auxiliary table, then just retrieve the modules that are allowed for that userid.

When logging in, log in to the session what modules of that user ... and retrieve through foreach (), do not forget to put an if () else () to check if idUsuario = x has access to module x .

Questions, the willingness.

    
15.07.2015 / 05:23