I could see that working. One other thought is what if you created an admin_login.php which was exactly like the login.php except it had 3 fields.
regular_username
admin_username
password.
What if the admin logged in with someone else's regular username but their own username and password?
Hmmmm, I like that! How would I use this to generate a user session though?
Would there be an easy way to generate a error message like the "site is offline" one when the admin creates a user sesion?
It would definitely require some modifications to the user class. Basically there is a login and loginEmail and we would need a loginAdmin where it checks the admin's user id and pw, but creates a session for the user. I don't know how to flash up a message because after that point, for all intents and purposes, you would be fully logged in as the user.
Wondering if when the loginAdmin function runs, inserts a value into a db called admin_logins with the user_id and if there is, it displays a message?
I guess you could do something like "logged_in_by" that could check to see who logged them in and if logged_in_by == username, it displays nothing.