10-31-2016, 01:29 PM
Either way is fine. The problem is that admin is stuck at 2 and you don't want to change it....Believe it or not, that's legacy from being able to upgrade usercake from probably a decade ago.
As long as you get your > or < right and make sure to exclude permission level 2, I don't see a problem either way. Also, I'm hoping you left the code on admin_users as it will get updated from time to time.
Best practice would be to change access to that page to something that only you have if you don't want people to ever visit that page. If you want people to be able to access that page, but you want to modify it, best practice is to copy the entire file (and admin_user) to the usersc folder and then change the path to the init to ../users/init
This will prevent our updates from breaking your code.
Note that if "real" users will have access to admin_users you can always add those two queries at the top of the page so users can only access people who are below them. The big issue there is that you have to make sure that people can do the same with admin_user or they will be able to just change the get variable and modify users above them.
As long as you get your > or < right and make sure to exclude permission level 2, I don't see a problem either way. Also, I'm hoping you left the code on admin_users as it will get updated from time to time.
Best practice would be to change access to that page to something that only you have if you don't want people to ever visit that page. If you want people to be able to access that page, but you want to modify it, best practice is to copy the entire file (and admin_user) to the usersc folder and then change the path to the init to ../users/init
This will prevent our updates from breaking your code.
Note that if "real" users will have access to admin_users you can always add those two queries at the top of the page so users can only access people who are below them. The big issue there is that you have to make sure that people can do the same with admin_user or they will be able to just change the get variable and modify users above them.