I am building a mini social network for my sports club and want to create a 'admin' section that admin's can manage user accounts from, such as ban user, delete user etc.
I am using tank auth to handle the authentication of the normal site users but now I need another secure area for admins. What is the best approach for me to handle this? Do I add another field to the users table named admin
with a 1
for yes and 0
for no. Then check in the admin dashboard controller if the user is admin or not?
Ideally I'd like the average user to not be able to see a login form for admin area. So if joe bloggs (who is a registered member of the site) guesses mydomain.com/admin
they wont see anything there, only admin users would.
If there is a better way I should approach this, I'd be grateful for advice.