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)

Valter 05-02-2009 08:46 PM

Clear browser cache and forum cookies, then try again. Target user name should be displayed in message box.

FF|SkyPirate, You are currently using Cybernetec's account. Click here to go back to your admin account.

Super Jinni 05-04-2009 02:00 PM

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:
http://www.yoursite.com/forum/modcp/user.php?do=viewuser&u=xxx
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 :)

Valter 05-04-2009 11:29 PM

This has nothing with the ModCP.

Try disabling your installed hacks one by one to find which one causes errors.

Super Jinni 05-05-2009 04:29 AM

I did, they I disabled them all one by one and it was this hack.
I even disabled them all and enabled only this hack and got the error. if I disable it everything is normal and no error appears.

I'm sure it's from this hack because I installed this hack in my test forum and the error occurred after I installed it, when I disable it the error is gone.
I even installed it in another fresh forum in my localhost with no other hack beside it (only this hack installed in the fresh forum)

maybe this hack has nothing to do with the ModCP, but it definitely has something to do with useradmin_edit_start hook.
the line 348 in the user.php file is:
PHP Code:

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

and you are using that hook in this mod.


NOTE: this error appears only if I look for another user than me (the admin I mean)
if I view my profile as an admin via modcp nothing appears and everything is normal. but if I view another users profile, the error is there.

does anyone else has this error in this way? can anyone confirm please?

Kottos 05-12-2009 08:16 PM

if I on a user acc to log in want come myself the message: Kottos, You are currently using Kottos's account. Click here to go back to your admin account. . which wrong I make

cu

kottos

tipoboy 05-12-2009 08:30 PM

Quote:

Originally Posted by Super Jinni (Post 1804813)
I did, they I disabled them all one by one and it was this hack.
I even disabled them all and enabled only this hack and got the error. if I disable it everything is normal and no error appears.

I'm sure it's from this hack because I installed this hack in my test forum and the error occurred after I installed it, when I disable it the error is gone.
I even installed it in another fresh forum in my localhost with no other hack beside it (only this hack installed in the fresh forum)

maybe this hack has nothing to do with the ModCP, but it definitely has something to do with useradmin_edit_start hook.
the line 348 in the user.php file is:
PHP Code:

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

and you are using that hook in this mod.


NOTE: this error appears only if I look for another user than me (the admin I mean)
if I view my profile as an admin via modcp nothing appears and everything is normal. but if I view another users profile, the error is there.

does anyone else has this error in this way? can anyone confirm please?

got the same error on another log in as user mod,

work arond:

go in to plugins and disable the cyb - log in to user account EU - useradmin_edit_start

i have no issue with this mod so unsure if that will work

Super Jinni 05-18-2009 10:59 AM

Quote:

Originally Posted by tipoboy (Post 1809609)
got the same error on another log in as user mod,

work arond:

go in to plugins and disable the cyb - log in to user account EU - useradmin_edit_start

i have no issue with this mod so unsure if that will work

Thanks tipoboy.

for your work around, I'm afraid if I disable the cyb - log in to user account EU - useradmin_edit_start the mod won't work properly.

although I don't use this mod much, but it's really great one. and now I have it disabled till Cybernetec come up with a fix if possible.

djaravindth 05-18-2009 01:13 PM

thanks a lot..
its awesome plugin

tipoboy 06-10-2009 10:48 AM

Quote:

Originally Posted by Super Jinni (Post 1812866)
Thanks tipoboy.

for your work around, I'm afraid if I disable the cyb - log in to user account EU - useradmin_edit_start the mod won't work properly.

although I don't use this mod much, but it's really great one. and now I have it disabled till Cybernetec come up with a fix if possible.

i had this same error with the mod panel, and i disabled the plugin and it doesnt affct the product, i can still log into users accounts with no problems

dancue 06-12-2009 12:56 AM

A Few problems I'm running into.

1 - If I login to an account it will give me a redirect loop error. (I'm Using VBSEO) Pressing back page will then have me log into the user account.

2 - While using the user account, if I log into the admincp I will then be logged in the site as my name with the option of going back to the admin account.

3 - Lastly, trying to go back to the admin account will have the same error as #1.

glowinggal 06-15-2009 02:54 AM

installed this on 3.8.3 and doesn't seem to be any issues and set up admin permissions BUT.... when going to a user's settings the "log in as user" option is not in the drop down? suggestions?

glowinggal 06-15-2009 03:01 AM

nvm got it; I had to change the userid of my admin acct. it was set by default to 1 which i thought i was but had remembered i changed my username at some point which changed my id #

markuswarren 06-16-2009 02:37 PM

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.

Mysterious2207 06-25-2009 06:47 PM

Every time i have this mod enabled i get a white screen that says "Flood" how can i fix this?

tipoboy 06-29-2009 10:32 PM

CYB:

I have been using this mod with no problem for months, but i have since started a new board, on the same server added this mod, and it doesnt appear to work now.....

I log in as the user without a problem, it displays the you are currently logged in as userX click here to return to your account....

but when i click here it somehoe logs me in as that user and i can not log out again without manually clicking the log out link and manually logging myself in again

I am now using 3.8.3 and any help would be greatly appreciated .....

thanks in advanced
dave

Valter 06-29-2009 11:20 PM

Clear all forum cookies, then re-login and try it again.

Peacelily 07-02-2009 01:55 PM

This has a problem. If I have my forums set to ask a user to change their password after a certain amount of days, it will not let me log in and them and get past "changing their password" which presents a problem.

Anyway, take care

Peacelily 07-02-2009 02:01 PM

And after I have logged in as a user and gone back to me

, it will not let me log out as myself.

I don't even know what to do.

HastleGames 07-08-2009 11:08 AM

install the mod, but I see no option anywhere. nor in the admin-panel or the front-panel

sorry for my bad English

Valter 07-08-2009 12:28 PM

First set admins, then option will be shown.

Check screenshot 5, then screenshot 4.

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.

Sador 08-13-2009 05:25 PM

Quote:

Originally Posted by markuswarren (Post 1866220)
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.

Hm, for some reason this doesn't seem to work at my board. Doesn't add anything to the pop up menu.

Still, thanks for sharing.

markuswarren 08-14-2009 11:34 AM

Quote:

Originally Posted by Sador (Post 1866619)
Hm, for some reason this doesn't seem to work at my board. Doesn't add anything to the pop up menu.

Still, thanks for sharing.

Try sticking "xxxxxxxxxxx" or something that will display inside the conditional to check that this portion of it is working, as it sounds as though the conditional check might not be working.

I'm using the Matahari style by sultan themes, and it does differ, in terms of where items are located, to the default style. For example, the navbar items are not in the same location as in Default Style. Therefore it is possible that putting the code in postbit_legacy might not be where it should go, but it would make sense that it is, regardless of style being used.

Sador 08-14-2009 04:16 PM

Quote:

Originally Posted by markuswarren (Post 1867092)
Try sticking "xxxxxxxxxxx" or something that will display inside the conditional to check that this portion of it is working, as it sounds as though the conditional check might not be working.

I'm using the Matahari style by sultan themes, and it does differ, in terms of where items are located, to the default style. For example, the navbar items are not in the same location as in Default Style. Therefore it is possible that putting the code in postbit_legacy might not be where it should go, but it would make sense that it is, regardless of style being used.

Ah, I found the problem. Postbit_legacy is used only for people who are using legacy mode. So, the code was alright, just had to put it in postbit instead of postbit_legacy. Thanks for the help!

dandanch 08-21-2009 05:19 AM

doesn't seem to be working for 3.8.4 won't let you log in
to the users account do you have a fix?thanks

RedFoxy 08-24-2009 12:22 PM

Ok I found and fix the troubles about "Cyb - Advanced Forum Rules" and "Cyb - Login To User Account", to fix it you must edit "Cyb - Login To User Account - MI" and:

Find:
Code:

                                        $cyb_ltoua_link_mi = "<li class=\"thead\" style=\"float:$stylevar[right]\"><a href=\"member.php?$session[sessionurl]do=cyb_loginasuser&amp;u=$userinfo[userid]\">$vbphrase[cyb_ltua_title]</a></li>";
Replace With:
Code:

                                        $cyb_ltoua_link_mi = "<table cellpadding=\"4\" width=\"100%\" cellspacing=\"1\" border=\"0\"><tr valign=\"top\"><td class=\"thead\">$vbphrase[cybltua_hackname]</td></tr><tr valign=\"top\"><td class=\"vbmenu_option\"><a href=\"member.php?$session[sessionurl]do=cyb_loginasuser&amp;u=$userinfo[userid]\">$vbphrase[cyb_ltua_title]</a></td></tr></table>";

dandanch 08-25-2009 04:47 AM

on my 3.8.4 boards to get it working again all i did was uninstalled it and re-instilled
it should work fine..

DeanoUK 08-25-2009 08:04 AM

Installed on www.ukcigarforums.com, along with most over Cyb mods! Thanks bud!

LordDB 08-25-2009 09:21 PM

Quote:

Originally Posted by Amiga Harrison (Post 1857864)
I also get this error message in exactly the same way with this mod installed.
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/modcp/user.php(348) : eval()'d code on line 29

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.

uninstall the version you have at present, and install this version here:

https://vborg.vbsupport.ru/showthread.php?t=177947

hypoharry 09-05-2009 10:54 PM

Amazing collection of mods on my forums now but this is the best one buy far

Dutch_Boy 09-08-2009 04:37 PM

Love it !! Thanks for the great mod !!


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.01529 seconds
  • Memory Usage 1,894KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (10)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
  • (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