Version: 3.21, by Abe1
Developer Last Online: Jun 2010
Category: Administrative and Maintenance Tools -
Version: 4.0.0
Rating:
Released: 11-15-2009
Last Update: 11-16-2009
Installs: 1340
Uses Plugins Auto-Templates
Translations
No support by the author.
Admin Log In As User
About this hack:
This hack allows any admin that you set in admin permissions, to log in as any user. You have to go to the user's profile page and there will be a link to 'Log In As This User'. Also, there is a link the drop down menu in the ACP User Manager. If you are logged in as another user, you will get a message on top of the forum saying, 'You are currently logged in as another user. Click here to log back into your account.'
This hack is very easy to install. This hack has only the admin yes/no option. Just install and it's ready to be used!
<vb:if condition="is_member_of($bbuserinfo, 5,6)">
<li class="right">
<img src="{vb:stylevar imgdir_siteicons}/network.png" class="inlineimg" alt="" />
<a href="member.php?{vb:raw session.sessionurl}u={vb:raw memberinfo.userid}&admin_log_in_as_user={vb:raw memberinfo.userid}" rel="nofollow">
Log In As This User
</a>
</li>
</vb:if>
NOTE in the added block above you will need to change the usergroup ID's to the ones to match the ones your have given permissions to use the mod. For example in the above you will see bbuserinfo, 5,6 this shows that I have given permission to Usergroups 5 and 6 to use the mod.
There is actually an easier way to do this and have it show up in the drop-down board-wide, by using a template and a hook.
wo0rked like a charm, thanks for the template code modifications as well; makes life simple now.
Quote:
Originally Posted by iBaker
Everyone keeps asking how to fix this mod for v4.1...I posted the fix back at post 202 (I was aka Wilfred1 but after asking .org twice to combine my usernames they haven't responded) so I thought it might help if I attached the complete mod with the fixes in it for use on v4.1 PL2.
<vb:if condition="is_member_of($bbuserinfo, 5,6)">
<li class="right">
<img src="{vb:stylevar imgdir_siteicons}/network.png" class="inlineimg" alt="" />
<a href="member.php?{vb:raw session.sessionurl}u={vb:raw memberinfo.userid}&admin_log_in_as_user={vb:raw memberinfo.userid}" rel="nofollow">
Log In As This User
</a>
</li>
</vb:if>
NOTE in the added block above you will need to change the usergroup ID's to the ones to match the ones your have given permissions to use the mod. For example in the above you will see bbuserinfo, 5,6 this shows that I have given permission to Usergroups 5 and 6 to use the mod.
Hope this helps so others don't have to go trolling through all the previous thread posts.
There is a little known array_merge error with this mod that will show up if you edit a signature, among other things, in the ModCP. To fix it, find this code in the useradmin_edit_start hook: