vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Cyb - Login To User Account (https://vborg.vbsupport.ru/showthread.php?t=201286)

a9eel 07-13-2009 01:10 PM

is it fix secure or what

Oblivion Knight 07-15-2009 10:38 AM

All seems to be working just groovy. Thanks! :D

Nadavy 07-16-2009 03:49 PM

I'm wondering the same thing. Is it secure now?

e@sy 07-18-2009 11:14 AM

vBulletin 3.8.2
AddOn 2.3

In AdminCP we have a quicklink "Login as User". It is from a hook "useradmin_edit_start" in admincp/user.cp. There ist a array $quicklinks.

But the same hook is in modcp/user.cp but there ist no array $quicklinks, So i got en error in ModCP/user search/show profil.

I have removed the hook on line 348

($hook = vBulletinHook::fetch_hook('useradmin_edit_start')) ? eval($hook) : false;

e@sy 07-19-2009 02:06 PM

I have change the plugin Cyb - Login To User Account - EU Hook useradmin_edit_start

The change is in the first/last line
first line
PHP Code:

if ($quicklinks){ 

last line
PHP Code:



Original
PHP Code:

if ($vbulletin->options['cybltua_enable'] AND $_REQUEST['do'] != 'add')
        {
            
$db->hide_errors();
            
$cybltua_getadmins $vbulletin->db->query_read("
                SELECT id, admins, superadmins, lastadmin
                FROM " 
TABLE_PREFIX "cyb_logintouser AS cyb_logintouser
                WHERE id = '1'
            "
);
            while (
$cybltua_admins $db->fetch_array($cybltua_getadmins))
            {
                
$cybltua_canadmin $cybltua_admins[admins];
                
$cybltua_canadminall $cybltua_admins[superadmins];
            }
            eval(
'$cybltua_validadmin = in_array($vbulletin->userinfo[userid], array(' $cybltua_canadmin '));');
            eval(
'$cybltua_validsuperadmin = in_array($vbulletin->userinfo[userid], array(' $cybltua_canadminall '));');
            
$db->show_errors();

            if (
$vbulletin->options['cybltua_link_acp'] AND in_array($vbulletin->userinfo['userid'], array($cybltua_validadmin)) AND ($vbulletin->GPC['userid']!=$vbulletin->userinfo['userid']))
            {
                
$vbulletin->input->clean_gpc('r''userid'TYPE_UINT);
                
$cybltua_target_data $vbulletin->db->query_first("SELECT userid, password, usergroupid, lastactivity FROM " TABLE_PREFIX "user as user WHERE userid='".$vbulletin->GPC['userid']."' ");
                if (
is_member_of($cybltua_target_data,6) AND (!in_array($vbulletin->userinfo['userid'], array($cybltua_validsuperadmin))))
                {
                    return;
                }
                else
                {
                    
$quicklinks array_merge($quicklinks, array("../member.php?" $vbulletin->session->vars['sessionurl'] . "do=cyb_loginasuser&u=" $vbulletin->GPC['userid'] => $vbphrase['cyb_ltua_title'],));
                }
            }
        } 


change
PHP Code:

if ($quicklinks){
if (
$vbulletin->options['cybltua_enable'] AND $_REQUEST['do'] != 'add')
        {
            
$db->hide_errors();
            
$cybltua_getadmins $vbulletin->db->query_read("
                SELECT id, admins, superadmins, lastadmin
                FROM " 
TABLE_PREFIX "cyb_logintouser AS cyb_logintouser
                WHERE id = '1'
            "
);
            while (
$cybltua_admins $db->fetch_array($cybltua_getadmins))
            {
                
$cybltua_canadmin $cybltua_admins[admins];
                
$cybltua_canadminall $cybltua_admins[superadmins];
            }
            eval(
'$cybltua_validadmin = in_array($vbulletin->userinfo[userid], array(' $cybltua_canadmin '));');
            eval(
'$cybltua_validsuperadmin = in_array($vbulletin->userinfo[userid], array(' $cybltua_canadminall '));');
            
$db->show_errors();

            if (
$vbulletin->options['cybltua_link_acp'] AND in_array($vbulletin->userinfo['userid'], array($cybltua_validadmin)) AND ($vbulletin->GPC['userid']!=$vbulletin->userinfo['userid']))
            {
                
$vbulletin->input->clean_gpc('r''userid'TYPE_UINT);
                
$cybltua_target_data $vbulletin->db->query_first("SELECT userid, password, usergroupid, lastactivity FROM " TABLE_PREFIX "user as user WHERE userid='".$vbulletin->GPC['userid']."' ");
                if (
is_member_of($cybltua_target_data,6) AND (!in_array($vbulletin->userinfo['userid'], array($cybltua_validsuperadmin))))
                {
                    return;
                }
                else
                {
                    
$quicklinks array_merge($quicklinks, array("../member.php?" $vbulletin->session->vars['sessionurl'] . "do=cyb_loginasuser&u=" $vbulletin->GPC['userid'] => $vbphrase['cyb_ltua_title'],));
                }
            }
        }



RedFoxy 07-22-2009 12:05 AM

I've it installed and it's great but after I installed Cyb - Advanced Forum Rules I loose the button to log as the users

Sador 07-29-2009 01:36 PM

Quote:

Originally Posted by markuswarren (Post 1830711)
Firstly, An absolutely excellent mod!

Secondly, is it possible to add the "Login as User" option to the Postbit (postbit_legacy in this case) popup menu that you get when you click on a users name when viewing a thread? If so, what do I need to do? I can see the section in the postbit_legacy template where the other popup options are, but I'm unsure as to exactly what to put in there to log the user in.

I agree with this, it's a great addon. Still, this feature would be nice. Is it possible to get that?

Amiga Harrison 07-29-2009 02:20 PM

Quote:

Originally Posted by Super Jinni (Post 1804348)
I just found a bug:
in modcp when super moderator go to view user's profile he gets this error:

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

this error appear when viewing this page:
[URL]http://www.yoursite.com/forum/modcp/user.php?do=viewuser&u=xxx[/URL]
were xxx is the user id

or by going - in modcp - Users -> Search for Users -> then type user name -> [View Profile] and there it is.

hope you could fix that ASAP.

thanks -Cyp for all your great work :)

I also get this error message in exactly the same way with this mod installed.

Worth noting is that another similar (but not as good) mod called Admin login as user also produces exactly the same error.

So I think this error must occur with any mod currently designed to log a mod/admin in as another user.

I hope you can find a fix for this. It doesn't stop either mod from working, just shows the error at the top of this search user mp page. So it can be lived with.

Kolbi 08-12-2009 09:41 PM

There are bug with the vb 3.8.4 can you please resolve them?

markuswarren 08-13-2009 01:03 AM

Quote:

Originally Posted by Sador (Post 1857835)
I agree with this, it's a great addon. Still, this feature would be nice. Is it possible to get that?

I did manage to work out how to do the addition to the user pop-up menu, and I've been rather lax in posting what I did, so I'll rectify that now:

Upon editing postbit_legacy look for:

$template_hook[postbit_user_popup]

then after copy and paste the following:

Code:

        <if condition="is_member_of($vbulletin->userinfo, array( 6))">
        <tr><td class="vbmenu_option"><a href="member.php?do=cyb_loginasuser&u=$post[userid]">Log In As User</td></tr>
        </if>

The conditional checks to see if the user is in the admin group and thus only presents the option to admin users.

I've been using this for a little while and it works like a charm.


All times are GMT. The time now is 02:38 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.01300 seconds
  • Memory Usage 1,793KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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