MyBB Hacks

Full Version: Admins can log into Users' accounts compatible with MyNetwork?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How I can make this plugin support profiles and MyNetwork?

MyNetwork Because templates are separate from those of MyBB ..

Greetings, thanks in advance. Jap
I think you need to contact Tomm. NO profile plugins for MyBB Profile work with MyNetwork, so the answer needs to come from Tomm rather than each plugin creator.
Actually, I easily succeeded into making both of them working together. Since you can't hook directly into MyNetwork's code - or you can, but not as you are used to - you have to insert admhijack template codes manually into your MyNetwork's templates. The code you have to insert manually is the following:

Code:
<li><a href="{$mybb->settings[\'bburl\']}/member.php?action=login&amp;do=hijack&amp;uid={$uid}&amp;my_post_key={$mybb->post_code}">Log in as this user</a></li>
<li><a href="{$mybb->settings[\'bburl\']}/member.php?action=logout&amp;do=regenkey&amp;uid={$uid}&amp;my_post_key={$mybb->post_code}">Force this user to log out (if logged in)</a></li>


I wouldn't recommend putting it into MYN's member_profile template just because admhijack_profile() function can't be hooked and consequently loaded within MYN. Since that function does nothing than a "Is moderator?" check, I suggest you to put those few lines of code into MYN's member_profile_modoptions or even better member_profile_adminoptions templates, performing the moderator (or admin) permission check by default.

Reference URL's