vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Login as user (https://vborg.vbsupport.ru/showthread.php?t=39841)

firewars 06-14-2002 03:25 PM

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


malc 06-14-2002 03:25 PM

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>
+-------------------------------------------------------------------------------------------------+ 


Chris M 06-14-2002 03:28 PM

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

Or is it already?

Satan

Hotte 06-14-2002 04:27 PM

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(); 


scsa20 06-14-2002 04:49 PM

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 :rolleyes:

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

PHP Code:

if ($action=="loginas"){ 


Dean C 06-14-2002 05:49 PM

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

firewars 06-14-2002 06:36 PM

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.

-=dm=- 06-14-2002 07:31 PM

Nice one thanx :)

Lovaboye 06-14-2002 07:52 PM

i just get a blank screeen? doesnt work? what is wrong?

firewars 06-14-2002 08:03 PM

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


All times are GMT. The time now is 06:51 AM.

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.01340 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete