Admin Can Login as Any User
Author Message
After activation, this adds two option to user profiles, only visible to administrators:
  • Login as this user
  • Force logout
The first allows the administrator to effectively login to the account without the user's password.  Everything behaves normally in this login state.  The only difference is that logging out will return the administrator back to their original account.
(note, please don't use this to log into another administrator's account, and then log into some other account from there, though I haven't tried what happens if you do this)

The second option just forces the user to log out if they have logged in somewhere.

Alternative version: Login As by burnacid
(This post was last modified: 06-05-2018 09:30 AM by ZiNgA BuRgA.)
Find all posts by this user
Quote this message in a reply
Download: admhijack.php (3.68 KB)
Plugin Version: 1.2
Last Updated: 11-02-2011, 10:09 PM

Downloads: 4,306
MyBB Compatibility: 1.2.x, 1.4.x, 1.6.x, 1.8.x
Uploader: ZiNgA BuRgA
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #11
RE: Admin Can Login as Any User
Yes, you have to be very explicit when you say these things, or I won't be able to figure out what you want exactly.

If you want to exclude users to be hijackable, don't do the edit I said earlier, instead, find both instances:

PHP Code:
if(!$user) error('Invalid UserID supplied.');

for both, add after:

PHP Code:
if(in_array($user['uid'], array(1,2,3))) error('Cannot log in / clear key of this user.');


The link will still appear, but won't work.


My Blog
08-24-2010 08:59 AM
Find all posts by this user Quote this message in a reply
patrese Offline
Junior Member
**
Posts: 11
Joined: Aug 2010
Post: #12
RE: Admin Can Login as Any User
Thanks and sorry I was not clear enough!
08-25-2010 03:21 AM
Find all posts by this user Quote this message in a reply
CoasterRacheal Offline
Junior Member
**
Posts: 3
Joined: Sep 2010
Post: #13
RE: Admin Can Login as Any User
I absolutely love this plug in, however I noticed after I switched my servers over and moved my forums, this plug in stopped working all of a sudden. I've gone as far as to delete it and reinstall it to no avail. I've also tried deactivating it and reactivating it and it still won't work.

Is there any way to fix this? Would backing up my forums and moving them over cause this problem?

I'm using MyBB V 1.4.14 (if that helps)
(This post was last modified: 09-10-2010 07:53 AM by CoasterRacheal.)
09-10-2010 07:51 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #14
RE: Admin Can Login as Any User
(09-10-2010 07:51 AM)CoasterRacheal Wrote:  this plug in stopped working
You've got to define what "stopped working" means.
Do links show up?  Does it not log you into different accounts?

My Blog
09-10-2010 09:03 AM
Find all posts by this user Quote this message in a reply
CoasterRacheal Offline
Junior Member
**
Posts: 3
Joined: Sep 2010
Post: #15
RE: Admin Can Login as Any User
By stopped working I mean that when you visit any user's profile, there is no link to log into a user's account. My apologies for being vague.

Click here for a screenshot (I don't want to stretch the page)
(This post was last modified: 09-10-2010 09:10 AM by CoasterRacheal.)
09-10-2010 09:06 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #16
RE: Admin Can Login as Any User
Please make sure you have {$modoptions} variable in your member_profile templates.

09-10-2010 09:32 AM
Find all posts by this user Quote this message in a reply
CoasterRacheal Offline
Junior Member
**
Posts: 3
Joined: Sep 2010
Post: #17
RE: Admin Can Login as Any User
Thank you RateU for the help! It took me a few minutes to find the template, but that fixed the issue I was having.
09-10-2010 09:43 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #18
RE: Admin Can Login as Any User
Glad you can solve the problem Smile

09-10-2010 09:47 AM
Find all posts by this user Quote this message in a reply
tacticalbread Offline
Junior Member
**
Posts: 1
Joined: Sep 2010
Post: #19
RE: Admin Can Login as Any User
This is brilliant.
09-13-2010 05:47 PM
Find all posts by this user Quote this message in a reply
bluearrow Offline
Junior Member
**
Posts: 2
Joined: Nov 2010
Post: #20
RE: Admin Can Login as Any User
This one is interesting but I don't think members would like the idea. But it would be cool if Admin can check PM's because sometimes this comes handy when you sort out fights and also spammers.
11-13-2010 08:48 PM
Find all posts by this user Quote this message in a reply


Forum Jump: