vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Administrative and Maintenance Tools - Admin Log In As User (https://vborg.vbsupport.ru/showthread.php?t=122939)

Abe1 08-02-2006 10:00 PM

Admin Log In As User
 
Admin Log In As User 3.0


PLEASE CLICK ON THIS LINK TO DOWNLOAD AND FOR SUPPORT FOR THIS HACK: https://vborg.vbsupport.ru/showthread.php?t=168819

Version 3.0 was created for both vb3.6 and vb3.7. I will no longer give support in this thread for this hack. Please click 'install' in the vb3.7 section for notifications about updates.

vphost 08-03-2006 08:34 PM

Does this record the IP of the Superadmin as well or will this be 'invisible'?

Will this list / add this user to the active user list?

Abe1 08-03-2006 08:44 PM

Quote:

Originally Posted by vphost
Does this record the IP of the Superadmin as well or will this be 'invisible'?

Will this list / add this user to the active user list?

It does not record you logging in. Also, others will not see you as online.

Scooterpig 08-03-2006 11:01 PM

Is it possible to change the color of the text or background for the logged in wording as per center pic please?

Abe1 08-03-2006 11:32 PM

Quote:

Originally Posted by Scooterpig
Is it possible to change the color of the text or background for the logged in wording as per center pic please?

You can edit the template how ever you would like.

JakeS 08-04-2006 06:19 AM

Just to let you know you forgot to close a url tag in the header

currently is
Code:

<!-- Start Admin Log In As User -->
<if condition="$_REQUEST['admin_log_in_as_user'] OR $_COOKIE[COOKIE_PREFIX . 'admin_log_in_as_user']">
        <div align="center" style="color: red; background-color: white; border: 1px solid black; padding:2px"><a href="$vboptions[forumhome].php$session?[sessionurl]&amp;log_out_admin_log_in_as_user=true">$vbphrase[admin_log_out_as_user]</div>
</if>
<!-- End Admin Log In As User -->

should be
Code:

<!-- Start Admin Log In As User -->
<if condition="$_REQUEST['admin_log_in_as_user'] OR $_COOKIE[COOKIE_PREFIX . 'admin_log_in_as_user']">
        <div align="center" style="color: red; background-color: white; border: 1px solid black; padding:2px"><a href="$vboptions[forumhome].php$session?[sessionurl]&amp;log_out_admin_log_in_as_user=true">$vbphrase[admin_log_out_as_user]</a></div>
</if>
<!-- End Admin Log In As User -->


tinjon 08-04-2006 01:35 PM

for those who prefer "manual" way of doing things, here's an idea.

1. duplicate the 'adminstrator' group. don't format your title. just make it look like the registered user group. but give administrative permission.
2. register/make a new nick and put this under the newly created admin group.

so it will look as if there is no admin online because u will appear like any other user.

there you go. secret, undercover admin. ;)

Abe1 08-04-2006 06:27 PM

Quote:

Originally Posted by JakeS
Just to let you know you forgot to close a url tag in the header

currently is
Code:

<!-- Start Admin Log In As User -->
<if condition="$_REQUEST['admin_log_in_as_user'] OR $_COOKIE[COOKIE_PREFIX . 'admin_log_in_as_user']">
        <div align="center" style="color: red; background-color: white; border: 1px solid black; padding:2px"><a href="$vboptions[forumhome].php$session?[sessionurl]&amp;log_out_admin_log_in_as_user=true">$vbphrase[admin_log_out_as_user]</div>
</if>
<!-- End Admin Log In As User -->

should be
Code:

<!-- Start Admin Log In As User -->
<if condition="$_REQUEST['admin_log_in_as_user'] OR $_COOKIE[COOKIE_PREFIX . 'admin_log_in_as_user']">
        <div align="center" style="color: red; background-color: white; border: 1px solid black; padding:2px"><a href="$vboptions[forumhome].php$session?[sessionurl]&amp;log_out_admin_log_in_as_user=true">$vbphrase[admin_log_out_as_user]</a></div>
</if>
<!-- End Admin Log In As User -->


Thanks. I updated the zip file.

Abe1 08-04-2006 06:28 PM

Quote:

Originally Posted by tinjon
for those who prefer "manual" way of doing things, here's an idea.

1. duplicate the 'adminstrator' group. don't format your title. just make it look like the registered user group. but give administrative permission.
2. register/make a new nick and put this under the newly created admin group.

so it will look as if there is no admin online because u will appear like any other user.

there you go. secret, undercover admin. ;)

What if you want to test a users account because they are compalining about something. What is your 'manual' way?

tinjon 08-05-2006 12:04 AM

Quote:

Originally Posted by Abe1
What if you want to test a users account because they are compalining about something. What is your 'manual' way?

move the account to registered user group temporarily.

xug 08-05-2006 12:59 AM

When I jump on my test board into the admin panel and want to add a new (test) user I get the following error:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /admincp/user.php(461) : eval()'d code on line 9

This is a clean vB3.6.0 fresh install, no hacks, no addons, this is the first one

Abe1 08-06-2006 12:47 AM

Quote:

Originally Posted by xug
When I jump on my test board into the admin panel and want to add a new (test) user I get the following error:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /admincp/user.php(461) : eval()'d code on line 9

This is a clean vB3.6.0 fresh install, no hacks, no addons, this is the first one

I'll look into this. Other users had reported this in last version but I was unable to re-produce. If you have any more info on this bug, please post it.

TomJames 08-08-2006 04:10 AM

I will be installing this tomorrow, great idea, I often have the problem of members not knowing how to do something, so this will help lots.

Great hack.

Stoebi 08-10-2006 06:30 PM

Quote:

Originally Posted by Abe1
I'll look into this. Other users had reported this in last version but I was unable to re-produce. If you have any more info on this bug, please post it.

Hi,

it happens with php 5 (here 5.1.1) installed. I've read the function array_merge() goes another way, but which?



Regards, Stoebi

Bydigi 08-11-2006 07:26 AM

@abe1; Thanks :)

Abe1 08-11-2006 04:09 PM

Quote:

Originally Posted by Stoebi
Hi,

it happens with php 5 (here 5.1.1) installed. I've read the function array_merge() goes another way, but which?



Regards, Stoebi

Thanks for the tip. I'll see what I can find.

ktp101 08-18-2006 06:52 PM

installed, thanks :)

Stoebi 08-19-2006 05:52 PM

Quote:

Originally Posted by Abe1
Thanks for the tip. I'll see what I can find.

Working with php4/php5:
Replace the content of the hook useradmin_edit_start with:
PHP Code:

if (in_array($vbulletin->userinfo[userid], preg_split('#\s*,\s*#s'$vbulletin->config['SpecialUsers']['superadministrators'], -1PREG_SPLIT_NO_EMPTY)))
{
    if (!
is_array($quicklinks))
    {
        
$quicklinks = array();
    }
    
$quicklinks array_merge($quicklinks
        array(
"../member.php?" $vbulletin->session->vars['sessionurl'] . "do=getinfo&amp;u=" $vbulletin->GPC['userid'] . "&amp;admin_log_in_as_user=" $vbulletin->GPC['userid'] => $vbphrase['log_in_as_user'],));




Regards, Stoebi

whitetigergrowl 08-19-2006 06:52 PM

LOL Wow I can see this one getting abused more than a $2 hooker.

jibious 08-19-2006 11:03 PM

Quote:

Originally Posted by whitetigergrowl
LOL Wow I can see this one getting abused more than a $2 hooker.

If an admin knows anything about their SQL database, then you'd already be able to 'abuse' it in the most extreme method - without no one EVER knowing.

whitetigergrowl 08-21-2006 04:19 AM

Quote:

Originally Posted by jibious
If an admin knows anything about their SQL database, then you'd already be able to 'abuse' it in the most extreme method - without no one EVER knowing.

Luckily alot of them dont. ;)

haddockman 08-24-2006 05:52 AM

Quote:

Originally Posted by whitetigergrowl
LOL Wow I can see this one getting abused more than a $2 hooker.

Together with the Read PMs hack I feel like George Orwell in 1984! :D

Thanks again for this hack, Abe1 :)

Ninth Dimension 08-25-2006 06:41 PM

Nice hack, thank you very much, although I think there is a problem with it.

When I log in as a user, and try to view someone elses member profile page, it only shows the page of the person you're logged into. I realise this might not be the most important thing that needs fixing, but I figured I'd let you know anyway.

/installed

Oh, and one more thing, I don't know if this is important or not, but the link you click to log back in as yourself looks like this: index.php?[sessionurl]&log_out_admin_log_in_as_user=true (note: [sessionurl]). It still works as it's meant to (I think), but this didn't look right.

Abe1 08-25-2006 06:59 PM

Quote:

Originally Posted by Ninth Dimension
Nice hack, thank you very much, although I think there is a problem with it.

When I log in as a user, and try to view someone elses member profile page, it only shows the page of the person you're logged into. I realise this might not be the most important thing that needs fixing, but I figured I'd let you know anyway.

/installed

Oh, and one more thing, I don't know if this is important or not, but the link you click to log back in as yourself looks like this: index.php?[sessionurl]&log_out_admin_log_in_as_user=true (note: [sessionurl]). It still works as it's meant to (I think), but this didn't look right.

I know about the sessionurl problem. I keep forgetting to fix that.

I'm not sure I understand the first problem.

Stoebi 08-25-2006 07:09 PM

Quote:

Originally Posted by Abe1
I know about the sessionurl problem. I keep forgetting to fix that.

I'm not sure I understand the first problem.

Hi,

thx Abe1 for a new update, but i can't find any changes. :(


Regards, Stoebi

Abe1 08-25-2006 07:22 PM

Quote:

Originally Posted by Stoebi
Hi,

thx Abe1 for a new update, but i can't find any changes. :(


Regards, Stoebi

One one released today? I only update the zip with the aml file having the version check url.

Ninth Dimension 08-25-2006 08:17 PM

Quote:

Originally Posted by Abe1
I'm not sure I understand the first problem.

OK, well I've just had another look, and what I said was not totally correct anyway.

If I log in as one of my members, then view their profile page (say http://theice.co.uk/member.php?u=77 for example), then it'll show their info. But if I view my own profile page while logged in as one of my members (in this case http://theice.co.uk/member.php?u=1), rather than showing my info, it shows the info of the person I'm logged in as.

Anyway, I don't supose its all that important, I thought I'd just let you know.

Oh, and if you fix the [sessionid] thing, let me know (or have you already? and if so, do you just import the product and overwrite?)

Abe1 08-27-2006 12:17 AM

Quote:

Originally Posted by Ninth Dimension
OK, well I've just had another look, and what I said was not totally correct anyway.

If I log in as one of my members, then view their profile page (say http://theice.co.uk/member.php?u=77 for example), then it'll show their info. But if I view my own profile page while logged in as one of my members (in this case http://theice.co.uk/member.php?u=1), rather than showing my info, it shows the info of the person I'm logged in as.

Anyway, I don't supose its all that important, I thought I'd just let you know.

Oh, and if you fix the [sessionid] thing, let me know (or have you already? and if so, do you just import the product and overwrite?)

just add a '$' before '[sessionid]'

Stoebi 08-27-2006 01:29 AM

Quote:

Originally Posted by Abe1
just add a '$' before '[sessionid]'

Hi

Where i can find sessionid, because i didn't find the word sessionid in Instructions.txt and product-abe1_admin_log_as_user.xml, only sessionurl?

Regards, Stoebi

Abe1 08-27-2006 01:59 AM

Quote:

Originally Posted by Stoebi
Hi

Where i can find sessionid, because i didn't find the word sessionid in Instructions.txt and product-abe1_admin_log_as_user.xml, only sessionurl?

Regards, Stoebi

One of the teplate edits.

Stoebi 08-27-2006 02:06 AM

Quote:

Originally Posted by Abe1
One of the teplate edits.

Sorry Abe1

Quote:

Admin Log In As User version 2.0

FOR UPGRADE AND FRESH INSTALLATIONS!

1) Import product-abe1_admin_log_as_user.xml into PRODUCTS. Allow Overwrite "YES" (admincp -> Plugin System -> Manage Products -> [Add/Import Product])

2) Do the template edits

in header:

find:
--------------------------------------------------------------------
<!-- logo -->
--------------------------------------------------------------------

BEFORE place this:
--------------------------------------------------------------------
<!-- Start Admin Log In As User -->
<if condition="$_REQUEST['admin_log_in_as_user'] OR $_COOKIE[COOKIE_PREFIX . 'admin_log_in_as_user']">
<div align="center" style="color: red; background-color: white; border: 1px solid black; padding:2px"><a href="$vboptions[forumhome].php$session?[sessionurl]&amp;log_out_admin_log_in_as_user=true">$vbphra se[admin_log_out_as_user]</a></div>
</if>
<!-- End Admin Log In As User -->
--------------------------------------------------------------------



in MEMBERINFO:

find:
--------------------------------------------------------------------
<td class="vbmenu_control"><a href="infraction.php?$session[sessionurl]do=report&amp;u=$userinfo[userid]">$vbphrase[give_infraction]</a></td>
--------------------------------------------------------------------

AFTER place this:
--------------------------------------------------------------------
<!-- Start Admin Log In As User -->
</if>
<if condition="$show_admin_log_as_user_link">
<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]u=$userinfo[userid]&amp;admin_log_in_as_user=$userinfo[userid]">$vbphrase[log_in_as_user]</a></td>
<!-- End Admin Log In As User -->
--------------------------------------------------------------------

Done.
None sessionid :(


Regards, Stoebi

Abe1 08-27-2006 02:15 AM

sorry, sessionurl in the header.

Stoebi 08-27-2006 04:00 AM

Quote:

Originally Posted by Abe1
sorry, sessionurl in the header.

Thx a lot Abe1 :)

Quote:

Originally Posted by Ninth Dimension
When I log in as a user, and try to view someone elses member profile page, it only shows the page of the person you're logged into. I realise this might not be the most important thing that needs fixing, but I figured I'd let you know anyway.

I can't reproduce it. I've logged in as testuser for example and i can see the member profile page from the other registered user (blabla, stoebi, tester) on my test forum.

Edit:
I can reproduce it only if i want to see the profile pages from admins.

For example:
Webmaster = Admin
Webmaster logged in as Stoebi
As Stoebi i want to see the profile page from me (Webmaster), and i see my own profile page (Stoebi not the page from Webmaster)

Another example:
Stoebi is now Superadministrator and is logged in as user blabla, but as user blabla now i can't view the profile page from Stoebi and Webmaster.
I see my own profile page (blabla)


Regards, Stoebi

Abe1 08-27-2006 12:11 PM

Quote:

Originally Posted by Stoebi
Thx a lot Abe1 :)



I can't reproduce it. I've logged in as testuser for example and i can see the member profile page from the other registered user (blabla, stoebi, tester) on my test forum.

Edit:
I can reproduce it only if i want to see the profile pages from admins.

For example:
Webmaster = Admin
Webmaster logged in as Stoebi
As Stoebi i want to see the profile page from me (Webmaster), and i see my own profile page (Stoebi not the page from Webmaster)

Another example:
Stoebi is now Superadministrator and is logged in as user blabla, but as user blabla now i can't view the profile page from Stoebi and Webmaster.
I see my own profile page (blabla)


Regards, Stoebi

Do you need to log in as another user just to see your profile page?

Ninth Dimension 08-27-2006 12:30 PM

I've tred adding a $ to the start of [sessionurl], but it then just shows $[sessionurl] in the URL. Are you sure it's not meant to be something like $something[sessionurl], maybe $_SESSION[sessionurl] or something like that?

Stoebi 08-27-2006 01:21 PM

Quote:

Originally Posted by Abe1
Do you need to log in as another user just to see your profile page?

You need to logged in as Abe1 for example to your ACP.
Then log in as another User, for example Testuser and try to look at your (Abe1) profile.


Quote:

Originally Posted by Ninth Dimension
I've tred adding a $ to the start of [sessionurl], but it then just shows $[sessionurl] in the URL. Are you sure it's not meant to be something like $something[sessionurl], maybe $_SESSION[sessionurl] or something like that?

My HEADER, it works fine now:
Code:

find:
--------------------------------------------------------------------
<!-- logo -->
--------------------------------------------------------------------

BEFORE place this:
--------------------------------------------------------------------
<!-- Start Admin Log In As User -->
<if condition="$_REQUEST['admin_log_in_as_user'] OR $_COOKIE[COOKIE_PREFIX . 'admin_log_in_as_user']">
        <div align="center" style="color: red; background-color: white; border: 1px solid black; padding:2px"><a href="$vboptions[forumhome].php?$session[sessionurl]log_out_admin_log_in_as_user=true">$vbphrase[admin_log_out_as_user]</a></div>
</if>
<!-- End Admin Log In As User -->
--------------------------------------------------------------------



Regards, Stoebi

Ninth Dimension 08-27-2006 02:00 PM

Stoebi, much better, thank you :)

darksoulz 08-28-2006 03:47 PM

I'm not sure what's not working right, but in our case when you click the link to login as a different user, we get the header line saying we are logged in as the other user and click to log back in to our account. But everything else is showing up like we're not logged in at all most of the time. It seems to randomly show it as logged in as that user sometimes, but most of the time not. The only thing I can think of is maybe a conflict with another addon? Cant think of what it could be though.

PassLab.net 08-30-2006 10:03 PM

perfect, installed

redlabour 08-31-2006 06:26 AM

It does still not work - and i have updated today. I can use a other Account but if i click on "Private Messages" the System wants me to log in. :/


All times are GMT. The time now is 06:05 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.01536 seconds
  • Memory Usage 1,867KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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