Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Login as user Details »»
Login as user
Version: 1.00, by Hotte Hotte is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-13-2002 Last Update: Never Installs: 99
 
No support by the author.

Hi
this hack allows admins to login as any user they want. In the Adminpanel you´ll have a link in the "edit user"-screen which allows you to login as the user. Good for testing and finding errors that the user reports etc

Only 1 File to edit (admin/user.php)
Installationtime: < 5 minutes

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-14-2002, 03:25 PM
firewars firewars is offline
 
Join Date: Oct 2001
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Never mind, I found it using another part of the whole line.
This is what mine looks like:

PHP Code:
  <li>".makelinkcode("View the profile for $user[username]","../member.php?s=$session[sessionhash]&action=getinfo&userid=$userid",1)."</li
Reply With Quote
  #13  
Old 06-14-2002, 03:25 PM
malc malc is offline
 
Join Date: Oct 2001
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

remplace

PHP Code:
+-------------------------------------------------------------------------------------------------+
In admin/user.phpfind this code:                                                              |
+-------------------------------------------------------------------------------------------------+
<
li>\".makelinkcode(\"View the profile for $user[username]\",\"../member.php?s=$session[sessionhash]&action=getinfo&userid=$userid\",1).\"</li>
+-------------------------------------------------------------------------------------------------+

+-------------------------------------------------------------------------------------------------+
| After this, add:                                                                                |
+-------------------------------------------------------------------------------------------------+
<li>\".makelinkcode(\"View the profile for 
$user[username]\",\"../member.php?s=$session[sessionhash]&action=getinfo&userid=$userid\",1).\"</li>
<li>\".makelinkcode(\"Login as User\",\"user.php?s=
$session[sessionhash]&action=loginas&userid=$user[userid]\",1).\"</li>
+-------------------------------------------------------------------------------------------------+ 
by
PHP Code:
+-------------------------------------------------------------------------------------------------+
In admin/user.phpfind this code:                                                              |
+-------------------------------------------------------------------------------------------------+
<
li>".makelinkcode("View the profile for $user[username]","../member.php?s=$session[sessionhash]&action=getinfo&userid=$userid",1)."</li>
+-------------------------------------------------------------------------------------------------+

+-------------------------------------------------------------------------------------------------+
replace with:                                                                                |
+-------------------------------------------------------------------------------------------------+
<
li>".makelinkcode("View the profile for $user[username]","../member.php?s=$session[sessionhash]&action=getinfo&userid=$userid",1)."</li>
<
li>".makelinkcode("Login as User","user.php?s=$session[sessionhash]&action=loginas&userid=$user[userid]",1)."</li>
+-------------------------------------------------------------------------------------------------+ 
Reply With Quote
  #14  
Old 06-14-2002, 03:28 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to restrict this function to just Userid 1?

Or is it already?

Satan
Reply With Quote
  #15  
Old 06-14-2002, 04:27 PM
Hotte Hotte is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by hellsatan
So what exactly can you do then?

Log in as the user and do exactly what they can?

Can you login as other Admins or Mods?

Satan
You can login as any user you want.
Quote:
Originally posted by malc
great hack ... but don't work
Try adding the "if ($action=="loginas"){" - Code before "cpheader();" at the beginning of the file (near line 42)

Quote:
Originally posted by hellsatan
Is there any way to restrict this function to just Userid 1?

Or is it already?

Satan
All Admins can do that. But for a quick solution you can add the following code directly after "if ($action=="loginas"){" (not tested)
PHP Code:
if($bbuserinfo[userid]!=1)show_nopermission(); 
Reply With Quote
  #16  
Old 06-14-2002, 04:49 PM
scsa20's Avatar
scsa20 scsa20 is offline
 
Join Date: Mar 2002
Location: Mars
Posts: 458
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

actuly, to code to use for limiting it to just you is:

PHP Code:
if ($bbuserinfo['userid']!=1
{
show_nopermission(); exit; } 
you seem to forgot the exit; command

oh, forgot to add...it so'pose to go in before

PHP Code:
if ($action=="loginas"){ 
Reply With Quote
  #17  
Old 06-14-2002, 05:49 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please dont have a go at me here... but i think that this is the worst possible hack someone could have ever made... i would hate someone to be able to login in as me at a board i post at... it ruins the point of having users...

this is just my opinion tho ... i dont like this idea

sorry

- Mist
Reply With Quote
  #18  
Old 06-14-2002, 06:36 PM
firewars firewars is offline
 
Join Date: Oct 2001
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I won't abuse the ability and only use it, if there are specific and someone's account-related problems that have to be solved.
Reply With Quote
  #19  
Old 06-14-2002, 07:31 PM
-=dm=- -=dm=- is offline
 
Join Date: Nov 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one thanx
Reply With Quote
  #20  
Old 06-14-2002, 07:52 PM
Lovaboye Lovaboye is offline
 
Join Date: Apr 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just get a blank screeen? doesnt work? what is wrong?
Reply With Quote
  #21  
Old 06-14-2002, 08:03 PM
firewars firewars is offline
 
Join Date: Oct 2001
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please remove any backslashes as shown by malc on the first page.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06156 seconds
  • Memory Usage 2,331KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete