The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
View As User
#31
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?
  Reply
#32
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?
  Reply
#33
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.
  Reply
#34
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?
  Reply
#35
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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)