UBB.Dev
Posted By: JustDave [6.2] Multiple Identity Detector - 02/15/2003 9:13 PM
Hal9000 suggested this. It's a simple modification to detect users with more than one login. As each new login is detected a PM will be sent to all administrators with information on the multiple identity users.


Update: Cookie uses configured expiration time and does not expire in 24 hours. Also, there is no on the number of identities tracked per user. As each new identity is used it is reported.


File's attached.

Happy Hunting. It's open season.


UPDATED: 4-15-03 by JoshPet - Added a step to expire the cookies for Admins. Otherwise, even though the cookie isn't set if you are an Admin, you get one when you use the "become this user feature". So as soon as you become 2 users... you start getting "Multiple Identity Detected" PMs out the ying yang. This update will prevent that. Hope JustDave doesn't mind me updating his code.

Attached File
Posted By: JoshPet Re: [6.2] Double Identity Detector - 02/15/2003 9:15 PM
Good work Dave... except there's no file.

You have been a busy beaver tonight.
Posted By: JustDave Re: [6.2] Double Identity Detector - 02/15/2003 9:17 PM
I deleted it because one of the brackets didn't line up. Call me picky. LoL

PS it should be there now and looking good. LoL
Posted By: JustDave Re: [6.2] Double Identity Detector - 02/15/2003 9:25 PM
Just a note, this is installed here and we know who you are...

LoL just kidding...


maybe...


LoL
Posted By: JoshPet Re: [6.2] Double Identity Detector - 02/15/2003 9:36 PM
We have ways of making you talk. Muhahahaha
Posted By: omegatron Re: [6.2] Double Identity Detector - 02/15/2003 10:01 PM
Cool one I tested and works perfectly.

JustDave is da man!!
Posted By: Dalantech Re: [6.2] Double Identity Detector - 02/15/2003 10:46 PM
Very !

Thanks!
Posted By: JustDave [6.2] Multiple Identity Detector - 02/15/2003 11:12 PM
hehe... updated it already.
Posted By: chillin Re: [6.2] Multiple Identity Detector - 02/16/2003 12:18 AM
this is soooo sweet. i know my inbox will be fillin up monday morning.

is it just me or is it harder to track down multiple users via IP in threads than it was in classic...?
Posted By: Hal9000 Re: [6.2] Multiple Identity Detector - 02/16/2003 12:44 AM
Only couple of hours have passed and you made this mod
Thaaanks
Posted By: chillin Re: [6.2] Multiple Identity Detector - 02/16/2003 12:52 AM
works wonderfully JustDave, thanks again
Posted By: JustDave Re: [6.2] Multiple Identity Detector - 02/16/2003 1:02 AM
Using IIP you can match users that have the same IP address by using wild cards * in place of the .
Posted By: Mudpuppy Re: [6.2] Multiple Identity Detector - 02/16/2003 5:54 AM
I've installed this and it works -- I just found out that two sisters who post on my board must share a computer.

Now that I know this -- and get reminded everytime one of them logs on -- is there any way to exclude member numbers from this check?
Posted By: JustDave Re: [6.2] Multiple Identity Detector - 02/16/2003 6:16 AM
As long as they don't clear their cookies the PM's will stop. If there is no cookie one is set with the current user number. Even if you log out this cookie will remain. If they log back in under a new user the new number is added to the cookie and a PM is sent. Now that the cookie has two numbers stored it will take a 3rd new number for it to send another PM.

I'm not sure which would be better for an ignore feature. Something from the configure file in the admin area where user numbers could be stored or to create a whole new field in the user's table and set a flag value to ignore the users with the field set.
Posted By: Hal9000 Re: [6.2] Multiple Identity Detector - 02/22/2003 9:30 AM
Dave in order to limit the number of pm's everytime that recognise a multiple identity, is there any other way to report this?
I was thinking of a page or a text file where all the multiple identities will be writen
Posted By: Lisa_P Re: [6.2] Multiple Identity Detector - 02/22/2003 10:02 AM
I had no idea this was here. And I WAS going to actually get a few hours of sleep. Thanks Dave!

Seriously, thank you. This will really make some of our work easier.
Posted By: caymuc Re: [6.2] Multiple Identity Detector - 02/22/2003 10:45 AM
This is a very cool and needed hack!

One strange result I got:

>From: **DONOTDELETE**
>I seem to have multiple personalities using ID numbers 1234 and 1
>sharing the same computer.

How can it happen that some user could login as User #1 DONOTDELETE

Is this a bug in the hack's code or is there a user using some sort of side entrance to threads nobody was aware of yet? - By the way: I have deleted only 2 users. I am pretty sure this one was not amongst them.
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 02/27/2003 4:32 AM
[]coy7 said:
I've installed this and it works -- I just found out that two sisters who post on my board must share a computer.

Now that I know this -- and get reminded everytime one of them logs on -- is there any way to exclude member numbers from this check? [/]
I admin on coy's board.... so the repeated duplicate PMs from the sisters were bugging me. They must toss their cookies. So I tweaked this a bit.

So..... Here's how you can ignore certain user numbers:

In the original double identity detection code....

Where it says:

Code
<br />         else {<br />            $tempID = ${$config['cookieprefix']."IDstack"};<br />


Change to this:
Code
<br />         elseif (!stristr(",{$config['allowed_dupes']},","{$user['U_Number']}")) {<br />            $tempID = ${$config['cookieprefix']."IDstack"};<br />



Then go into your config file.... at the very bottom and put this variable into the extra/unknown variable section.


$config['allowed_dupes'] = '14,17,13';

Between the quotes... put "allowed" duplicate user numbers. Separate them with a comma. What this does... if the user number matches a number on this list, it skips the Private Message send out.

Now if a user on the list has more identities than the what you list, you won't get notified. It basically ignores this user and it's assumed that they are allowed unlimited duplicates.

Hope that helps.
Josh

Posted By: Mudpuppy Re: [6.2] Multiple Identity Detector - 02/27/2003 6:01 AM
I think the sisters in question login to the board from school, and that's why they share a computer which also dumps cookies on a regular basis. I'm noticing this issue quite a bit with the number of college kids on my board.

This fix will really come in handy. There's nothing more disappointing than having a new PM then discovering it's just a "duplicate ID notification"
Posted By: Gardener Re: [6.2] Multiple Identity Detector - 02/27/2003 2:21 PM
I think a small change is needed in the code so that user number 15 won't match up to 156. Change this:

Code
<br />         elseif (!stristr(",{$config['allowed_dupes']},","{$user['U_Number']}")) {<br />            $tempID = ${$config['cookieprefix']."IDstack"};<br />


Into this:
Code
<br /><br />         elseif (!stristr(",{$config['allowed_dupes']},",",{$user['U_Number']},")) {<br />            $tempID = ${$config['cookieprefix']."IDstack"};<br />
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 02/27/2003 8:05 PM
Ah yes... the trailing comma.

Thank you. Good eye.
You can now join Dave_L in the Eagle Eye club .
Posted By: Gardener Re: [6.2] Multiple Identity Detector - 02/27/2003 8:50 PM
Actually there has to be a comma both before and after, as in my example, otherwise it might match 123 with 3123. =]
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 02/27/2003 10:17 PM
Yes. I remember that. You and dave helped me figure that out in teh PHP forum. I just was forgetful/careless.
Posted By: Hal9000 Re: [6.2] Multiple Identity Detector - 02/27/2003 11:28 PM
Would it be simpler if all the multiple identities to be written in a file without receiving all the time pm's?
Can this be made by someone?
Posted By: Astaran Re: [6.2] Multiple Identity Detector - 02/27/2003 11:43 PM
I thought of storing all this info in a database so that you can query for duplicate idenities of a specified user.

But i did come up with a satisfing db-schema so far. Maybe someone else has an idea?
Posted By: salim Re: [6.2] Multiple Identity Detector - 02/27/2003 11:45 PM
I must admit, this is the best hack I have installed in my threads so far. Damn, the Idea of having total control and knowing who is using what turns me on. Thanks JustDave, what can I say, you are a genious
Posted By: ksanuk Re: [6.2] Multiple Identity Detector - 03/04/2003 3:56 PM
Hi,

I just tried this on 6.1.1 but it does not work. It generates the following error:

Fatal error: Call to undefined function: get_input() in /export/data1/users2/board/public_html/ubbt.inc.php on line 229

Any suggestions on how I can get this to work on 6.1.1 ?
This would really be helpful on my board since I get the occasional dickhead signing up with a new ID just to flame someone (we have a very strict rule on flaming, you get warned once... if you are lucky).

Sanuk!
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 03/04/2003 5:13 PM
Try taking the get_input lines out of the cookies script. Those are unneeded (and that function didn't exist) in 6.1.x

Otherwise... I think it should work fine.
Posted By: ksanuk Re: [6.2] Multiple Identity Detector - 03/05/2003 3:45 AM
Hi,

"Try taking the get_input lines out of the cookies script. Those are unneeded (and that function didn't exist) in 6.1.x"
Thanks. Will give it a shot tonight when I get back home.

Sanuk!
Posted By: ksanuk Re: [6.2] Multiple Identity Detector - 03/06/2003 6:49 AM
Hi,

Thanks Josh, that seemed to have done the trick.

Sanuk!
Posted By: ksanuk Re: [6.2] Multiple Identity Detector - 03/06/2003 10:59 AM
Hi,

Hmmm, one of my mods created a new account, used it, then logged back in using his real account, but I did not receive any PM. He assures me that he did not mess around with his cookies.

Does one need to check the 'Remember me' box in order for this to work?

Sanuk!
Posted By: PhotoPost Re: [6.2] Multiple Identity Detector - 03/06/2003 11:46 PM
Anyone make a change to the script to show usernames instead of usernumbers?
this is a great script...
you will receive a pm with the usernumbers but as they are clickable and take you to that users profile there is no real need to make it go by username

Great script!
Thanks
Posted By: smilesforu Re: [6.2] Multiple Identity Detector - 03/19/2003 11:31 AM
I like the idea of the username included with the usernumbers, would make tracking stuff down friendlier. I also received a message today from user number 1 which I already had in the list, but didn't have the second number.

Under the impression I wouldn't get the messages if one of the numbers was listed... hmm

Anyway the list of exclude numbers has greatly decreased the messages I been getting on multiple identities.

Thanks again for a great mod.
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 04/16/2003 7:07 AM
UPDATED: 4-15-03 by JoshPet - Added a step to expire the cookies for Admins. Otherwise, even though the cookie isn't set if you are an Admin, you get one when you use the "become this user feature". So as soon as you become 2 users... you start getting "Multiple Identity Detected" PMs out the ying yang. This update will prevent that. Hope JustDave doesn't mind me updating his code.

If you already have this installed, add this above the Multiple Identity Detector Code:

Code
<br />if ($user['U_Status'] == "Administrator") {<br />     setcookie("{$config['cookieprefix']}IDstack",'',time()-846000,"{$config['cookiepath']}");<br />}   <br />


Coy - I installed this at your board because I was sick of so many PMs.
Posted By: Mudpuppy Re: [6.2] Multiple Identity Detector - 04/16/2003 8:50 AM
Sorry -- I forget that you get those PMs as well. I hate it when users post in the wrong thread, but have no option other than to manually move their post to the proper thread (I supposed I could delete the post... depends on what sort of mood I'm in). Anyway, I've been doing lots of "login as user" lately to move posts around.
Posted By: Dalantech Re: [6.2] Multiple Identity Detector - 04/16/2003 8:57 AM
One way to avoid triggering the mutiple identity check when you become another user is to use JustDave's My Cookie utility to clear your Threads cookie before you log back in as yourself.

The My Cookies utility will be in the next version of Threads (6.3).
Posted By: Hal9000 Re: [6.2] Multiple Identity Detector - 04/16/2003 6:43 PM
I made a small change in the code in order not to receive pm but every multiple identity to be writen in a file
I was getting tired reading,deleting pm's and I think this is a better solution for a busy board.

Code
  if (!empty($user['U_Number']) && $user['U_Status'] != "Administrator") {<br />         ${$config['cookieprefix'] . "IDstack"} = get_input($config['cookieprefix']."IDstack","cookie");<br />         if (empty(${$config['cookieprefix'] . "IDstack"})) {<br />            ${$config['cookieprefix']."IDstack"} = ",{$user['U_Number']},";<br />            setcookie("{$config['cookieprefix']}IDstack",${$config['cookieprefix']."IDstack"},time()+846000,"{$config['cookiepath']}");<br />         }<br />         else {<br />            $tempID = ${$config['cookieprefix']."IDstack"};<br />            if (!stristr($tempID,",{$user['U_Number']},")) {// another usernumber from same computer detected<br />               ${$config['cookieprefix']."IDstack"} .= "{$user['U_Number']},";<br />               setcookie("{$config['cookieprefix']}IDstack",${$config['cookieprefix']."IDstack"},time()+$config['cookieexp'],"{$config['cookiepath']}");<br />               $Unums = split(",",${$config['cookieprefix']."IDstack"});<br />               $andids = "";<br />               for ($i=0; $i<(sizeof($Unums)); $i++) {<br />                  if (!empty($Unums[$i])) {<br />                     if ($i > 1) {<br />                        $andids .= $ubbt_lang['MULTIPLE_IDENT_MSG2'];<br />                     }<br />                     $andids .= " <a href=\"{$config['phpurl']}/showprofile.php?Cat=$Cat&amp;User=" . $Unums[$i] . "\" target=\"_blank\">" . $Unums[$i] . "</a> ";<br />                  }<br />               }<br />               $msg = "<strong>" . $ubbt_lang['MULTIPLE_IDENT_MSG1'] . $andids . $ubbt_lang['MULTIPLE_IDENT_MSG3'] . "</strong>";<br />               $Sender = $user['U_Number'];<br />               $To = "ADMIN_GROUP";<br />               $Subject = $ubbt_lang['MULTIPLE_IDENT_DETECT'];<br />               //$this -> send_message($user['U_Number'],'',$Subject,$msg,'ADMIN_GROUP');<br />               $log=fopen("/home/public_html/ubbthreads/log.html","a");<br />               fwrite($log,"$msg<br>\n");<br />               fclose($log);<br />            }<br />         }<br />      } 


This code for ubbt.inc.php and it writes all the multiple identities in a log.html. You must create this first
Hope it helps
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 04/16/2003 6:48 PM
Very nice.
Posted By: Dave_L_dup1 Re: [6.2] Multiple Identity Detector - 04/16/2003 6:54 PM
[]$log=fopen("/home/public_html/ubbthreads/log.html","a");
fwrite($log,"$msg<br>\n");
fclose($log);[/]

This could be replaced with:

error_log("$msg<br>\n", 3, '/home/public_html/ubbthreads/log.html');

You probably wouldn't want that file to be publicly readable. I suggest making the log file a config parameter, e.g.:

error_log("$msg<br>\n", 3, $config['midetect_log']);
Posted By: AKD96 Re: [6.2] Multiple Identity Detector - 04/22/2003 2:17 AM
I just got this PM:

[]
I seem to have multiple personalities using ID numbers 124 and 1 sharing the same computer. Who am I? Seeking professional help, please advise! Is that Jerry? Who are those people? Where do they come from? No soup for you! and you! and you!
[/]

There is no member with ID 1.
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 04/22/2003 2:26 AM
I've seen that happen from time to time. User 1 is an unregistered user.... so I don't know how it does that.

It doesn't normally issue the cookies to users who aren't logged in... <shrug>
Posted By: smilesforu Re: [6.2] Multiple Identity Detector - 04/22/2003 4:35 AM
I get that message alot when I have mixed forums for unregistered posters. Then when they log in it keeps the cookie as #1 and theirs. I turned off my non registered (annonymous)forums and don't get these anymore.
Posted By: tenshu Re: [6.2] Multiple Identity Detector - 07/22/2003 11:02 AM
hmmm i installed on 6.3 but does not seem to be working, anyone else tried this on 6.3?
Posted By: deltajo Re: [6.2] Multiple Identity Detector - 07/28/2003 12:09 AM
I've tried to get this working again on 6.3.1 and nope.... nada.

I miss this hack working for me! This one has been one of the most valuable for me.

Free donuts for the one who gets it working again.
Posted By: AKD96 Re: [6.2] Multiple Identity Detector - 07/28/2003 8:09 AM
Ohhh...free donuts!!!!! []https://www.ubbdev.com/forum/graemlinlibrary/computer.gif[/]
Posted By: AKD96 Re: [6.2] Multiple Identity Detector - 07/28/2003 8:14 AM
Wait a second.... how do you know it's not working??? []https://www.ubbdev.com/forum/graemlinlibrary/questionicon.gif[/]
Posted By: JoshPet Re: [6.2] Multiple Identity Detector - 07/28/2003 8:25 AM
Yeah, I thought this worked fine in 6.3.
Posted By: deltajo Re: [6.2] Multiple Identity Detector - 07/28/2003 5:54 PM
I am a twit.

I forgot that I'd cleared my cookies, and that's why it didn't work.

Free donuts for everyone.

Posted By: Gardener Re: [6.2] Multiple Identity Detector - 07/28/2003 6:43 PM
With some slight modifications I got this to work with 6.1 as well. Great mod!
Posted By: Ian_W Re: [6.2] Multiple Identity Detector - 07/28/2003 8:58 PM
If anyone is interested, I altered this to send an email (rather than a PM) with the usernames already filled it - so it says something like fred and betty are sharing the same computer.



Posted By: JustDave Re: [6.2] Multiple Identity Detector - 07/28/2003 11:23 PM
[]Ian_W said:
If anyone is interested, I altered this to send an email (rather than a PM) with the usernames already filled it - so it says something like fred and betty are sharing the same computer.



[/]


Does Wilma know?


I think you should attach it in the new modifications board, regardless.

Thanks!
Posted By: Ian_W Re: [6.2] Multiple Identity Detector - 07/29/2003 2:02 AM
Yabadabadoooo....
Posted By: Chevy454 Re: [6.2] Multiple Identity Detector - 11/26/2003 12:41 AM
I installed this hack last night, and tried it out this afternoon. It seems to work, except the PM arrived with the subject field blank, which means you can't open it.

I was a *tad* unsure about the "generic.php" portion of the instructions, which may very well be where I screwed up. I pasted the supplied code just before the end of the rest of the code.

So, can anyone guess where I went wrong?
Posted By: isaac Re: [6.2] Multiple Identity Detector - 11/29/2003 9:18 AM
did you add the language files ?
Posted By: Chevy454 Re: [6.2] Multiple Identity Detector - 12/12/2003 10:14 PM
Ok, got it working, and it works well! Just one thing, though: is there a way to "modify" it so it PMs the mods, as well as the admins? If so, how?

Thanks!
Posted By: Kordegnen Re: [6.2] Multiple Identity Detector - 01/21/2004 11:06 AM
Is this working vith 6,4 ???

thomas
Posted By: ksanuk Re: [6.2] Multiple Identity Detector - 01/21/2004 1:41 PM
Hi,

Yes, using it with 6.4b1. Already caught 2 users

Sanuk!
Posted By: Rose Re: [6.2] Multiple Identity Detector - 10/01/2006 4:41 PM
Does anyone have this working with 6.5.4? I had it working with 6.5, but since upgrading it doesn't work. Any ideas? I really miss this mod - it is probably the most important one I have.

Thanks for any help.

Rose
Posted By: Rose Re: [6.2] Multiple Identity Detector - 10/01/2006 6:00 PM
Never mind - we got it working. Thanks anyway. smile

Rose
© UBB.Developers