MyBB Hacks

Full Version: Admin Can Login as Any User
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
Great plugin now how do I do it so some admins cant use it Smile

That should be a feature Smile
Open the plugin file in a text editor, find all instances of

PHP Code:
($mybb->usergroup['cancp'] != 'yes' && $mybb->usergroup['cancp'] != 1)

replace with

PHP Code:
(!in_array($mybb->user['uid'], array(1,2,3)))


and find

PHP Code:
($mybb->usergroup['cancp'] == 'yes' || $mybb->usergroup['cancp'] == 1)

replace with

PHP Code:
(in_array($mybb->user['uid'], array(1,2,3)))


In the above replacements, put a comma separated list of allowed user IDs in place of "1,2,3".

Lol, no-one found this in the few years that this plugin has been up.

Updated to v1.2: fix a slight security vulnerability with the force logout feature.
Thanks for the update, Yumi Biggrin
I use this plugin mainly in two circumstances:

On my localhost to test settings for various user types without having to make a round trip to the admin CP and on my live board when a user can only vaguely tell me "X does not work" and it is easier to log in as that user rather than spend ages trying to find out their issue. In short a very handy plugin and one I use rather more than I thought I would. Which brings me to my point...

I am thinking about installing Tomm's MyNetwork Profile Module set up (mainly for the comments addon) and this plugin is of course not compatible with it as Tomm has made his own profile module. I see that more and more boards are using that module and I wondered if you would either - make a version of the Admin Hijack plugin that is compatible with MyNetwork Profiles or give some pointers on how I can edit the existing plugin to work with the MyNetwork Profile Module.

Thank you.
I can't imagine this being incompatible.  It would probably just be failing to do template modifications?
I think the problem is that hooks change, the member_profile_start(end) hooks don't work anymore.

I get to add my information in MyNetwork only into a new tab, but adding my own variable was no possible for me.

If you just need to edit templates IIRC MyNetworks offers some functions to fin/replace templates just like mybb already does.
Well, it is definitely the hooks; I looked at that and yes Tomm has replaced the templates and the hooks. So there is nowhere for the plugin to start and the template cache is not available to call.

MYNetwork has a complete set of its own templates.
So it seems that it's a completely different page - arguably responsibility lies with it to be compatible with existing plugins.
But anyway, being too lazy to install that thing and test, does the following do anything?
In adminhijack.php, replace 'member_profile_end' with 'myn_profile_end'
I tried that Zinga - no result. I think it is because the link in the admin hijack is looking to do a "replace" of modoptions on the member profile template and that is no longer there.

I think I will work on using the existing profiles and not bother with the fancy comments. There is a major flaw in that really anyway - if I reply on another users profile and that user replies to me on their profile then I have to remember to go back and look - no notification. I think it is a good thing regarding keeping posting on the board, but still a flaw in the Profile plugin. (The MyNetwork one, not yours).
Pages: 1 2 3 4 5 6 7 8 9
Reference URL's