The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
View As User - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: View As User (/showthread.php?tid=344)

Pages: 1 2 3 4


View As User - mudmin - 03-20-2017

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?


View As User - Brandin - 03-20-2017

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?


View As User - mudmin - 03-23-2017

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.


View As User - Brandin - 03-23-2017

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?


View As User - mudmin - 03-23-2017

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.