vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Multiple account login detector (AE Detector) (https://vborg.vbsupport.ru/showthread.php?t=107566)

Quarterbore 08-24-2006 05:57 PM

Well, I figured it out... and man is this UGLY!

My problem is that I did a fresh install of vB 3.6 and I used Impex to IMPORT all of my forums, threads, and users! Well, a sizable percentage of my users userid CHANGED!

So now, these users have the old cookie from the old site on their systems PLUS the cookie for the new software. I assume that once everybody visits the updated forums that these errors will stop happening but with over 2000-members I may get these crazy errors for quite some time.

I know that the maximun shift I saw in userid was 4 so I may code the system to ignore userids that are 4 or less apart. This really hurts as this was a very handy tool!

MPDev 08-25-2006 01:24 PM

Well, that would do it. If they logged in under the old system and it has their userid recorded; then that would be a problem for you.

Quarterbore 08-25-2006 01:34 PM

Can I please request a little programing help with my issue?

I know that my members USERID behaves in a VERY predictable way when comparing the original userid to the new userid. Here is the breakdown:

If USERID is # - then I want the system to ignore...

(788 or less) (ignore Userid+1 as a duplicate)
(789 to 960) (report any duplicates)
(961 to 1550) (ignore Userid-1 as duplicates)
(1551 to 1762) (ignore Userid-2 as duplicates)
(1763 to 1843) (ignore Userid-3 as duplicates)
(1844 or higher) (report all duplicates!)

Now, I know this code is done by the "Login Checker" plugin and the code I need to add these conditional is here:

PHP Code:

if( empty($idstack) )  
                    {  
                        
$idstack ",{$vbulletin->userinfo['userid']},";  
                        
setcookie("IDstack"$idstacktime()+10368000"/");  
                    }  
                    else  
                    {  
                        if(!
strstr($idstack",{$vbulletin->userinfo['userid']},"))  
                        {  
                            
$idstack .= ",{$vbulletin->userinfo['userid']},";  
                            
setcookie("IDstack"$idstacktime()+10368000"/");  
      
                            
$Unums split(","$idstack);  
                            
$andids null;  
                            
$numvs 0;  
                              
                            for (
$i 0$i < (sizeof($Unums)); $i++)   
                            {  
                                if( 
verify_id('user'$Unums[$i], FALSE, -1, -1) )  
                                {  
                                    if (!empty(
$Unums[$i]) && is_numeric($Unums[$i])) {          
                                        
$checkuser $vbulletin->db->query_first("SELECT username FROM " TABLE_PREFIX "user WHERE userid={$Unums[$i]}");  
                                        if ( !empty(
$andids) ) $andids .= "and";  
                                        
$andids .= " [url="$vbulletin->options['bburl'] ."/member.php?u=" $Unums[$i] . "] "$checkuser['username'] ."[/url] ";  
                                        
$numvs++;  
                                    }  
                                }  
                            }  
                              
                            
// Make sure we have at least 2 valid user violations  
                            
if ( $numvs ) return;  
                              
                            
$allowsmilie '1';  
                            
$visible '1'

Now, would the best way for me to fix my self induced problem be to write a series of conditional like this:

PHP Code:

// Adjust for IMPORT ID issue
$loggedinuser $vbulletin->userinfo['userid'];
if (!empty(
$Unums[$i]) && is_numeric($Unums[$i])) { 
     If (
$loggedinuser <= 188 AND $loggedinuser == Unums[$i] + 1){$numvs--;}
     If (
$loggedinuser >= 961  AND $loggedinuser <= 1550 AND $loggedinuser == Unums[$i] - 1){$numvs--;}
     If (
$loggedinuser >= 1551  AND $loggedinuser <= 1762 AND $loggedinuser == Unums[$i] - 2){$numvs--;}
     If (
$loggedinuser >= 1763  AND $loggedinuser <= 1843 AND $loggedinuser == Unums[$i] - 3){$numvs--;}


I assume that I have the variables figured out but this will be really hard fro me to test on my live site to figure out if it is eliminiatig the correct accounts! I addedd this right above the "// Make sure we have at least 2 valid user violations "

EDIT - FWIW, there is a bug in that code as I just tried it... It have me a syntax error as well as a headers resent error and I had to disable pluggins to remove the pluggin from my system. I still think the basic concept may work but this is not the right place or way to do it!!!

I'll update if I figure this out but from my count this impacts about 1700 members on my site so dealing with that many alerts is a huge problem!

markblair 08-27-2006 06:29 AM

Quote:

Originally Posted by NeitherSparky
All right - I have installed this in 3.6.0 and it is working. For some reason though, while it is successfully sending a post to my Staff forum it is NOT sending me a PM even though I have specified Send PM on Multiple Login Detection=Yes (can it not do both?). Otherwise it is fine. :)

edit: Figured out what I did wrong, it should be fine now. :)

What was causing this issue? I am having the same problem. I'm getting the new thread but no PM is being sent. And both options are turned on.

Nick0r 08-27-2006 08:28 AM

For me it's not creating a thread, no matter what - never worked in 3.5 either for some reason.

NeitherSparky 08-27-2006 03:17 PM

Quote:

Originally Posted by markblair
What was causing this issue? I am having the same problem. I'm getting the new thread but no PM is being sent. And both options are turned on.

I took a screencap of my settings, not only to answer your question but hopefully to help people having trouble getting the thing to create a thread too.

The reason the PMs weren't working was simple enough - the default setting for the "Users who recieve the PM upon multiple login detection" is "Administrator" and my username on my forum isn't "Administrator", its Sparky! So I just changed that.

As for the thread creation, you have to mark "Enable New Thread Creation on Multiple Login Detection?" - Yes, and then put in the correct "ForumID For AE Multiple Login Detection reports", AND set the "Userid of who PM sender / Alert poster" to someone who has permission to post in that forum - 1 being of course myself (the target forum is a Staff forum). For the users to ignore, I have myself and my test account, which is number 2.

I hope this helps *somebody*. :P

MPDev 08-28-2006 08:03 PM

Since we have alot of people (including myself) who have it working on 3.5 and 3.6, if you cannot get it to work you probably did one of the following: installed it incorrectly, have the setting set wrong or have something installed that is interfering with our app (although we have no known plugins that do this).

voteforbird 08-28-2006 10:34 PM

Will this work with 3.6.0? Thanks.

Mattikana 08-29-2006 05:40 PM

Quote:

Originally Posted by voteforbird
Will this work with 3.6.0? Thanks.

It works for me on 3.6 Gold, I have the PM report enabled and the thread rpeort disabled.

cyclical 08-29-2006 09:13 PM

I am still getting false positives...


All times are GMT. The time now is 02:30 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.01524 seconds
  • Memory Usage 1,785KB
  • 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
  • (2)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
  • (2)pagenav_pagelinkrel
  • (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