Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.
Attachments
69034-MultipleIdentityDetector2.0.txt (0 Bytes, 437 downloads)

Last edited by JoshPet; 04/16/2003 12:05 AM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Good work Dave... except there's no file.

You have been a busy beaver tonight.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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

Last edited by JustDave; 02/15/2003 2:17 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Just a note, this is installed here and we know who you are...

LoL just kidding...


maybe...


LoL

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
We have ways of making you talk. Muhahahaha

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Cool one I tested and works perfectly.

JustDave is da man!!

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Very !

Thanks!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
hehe... updated it already.

Joined: Jan 2003
Posts: 125
Journeyman
Journeyman
Joined: Jan 2003
Posts: 125
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...?

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
Only couple of hours have passed and you made this mod
Thaaanks

Sponsored Links
Joined: Jan 2003
Posts: 125
Journeyman
Journeyman
Joined: Jan 2003
Posts: 125
works wonderfully JustDave, thanks again

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Using IIP you can match users that have the same IP address by using wild cards * in place of the .

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
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?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
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

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
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.


[:"red"]Lisa[/]
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]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


Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
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"

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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 />

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah yes... the trailing comma.

Thank you. Good eye.
You can now join Dave_L in the Eagle Eye club .

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Actually there has to be a comma both before and after, as in my example, otherwise it might match 123 with 3123. =]

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yes. I remember that. You and dave helped me figure that out in teh PHP forum. I just was forgetful/careless.

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
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?

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
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?

Joined: Feb 2003
Posts: 196
Member
Member
Offline
Joined: Feb 2003
Posts: 196
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

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
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!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
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!

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Thanks Josh, that seemed to have done the trick.

Sanuk!

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
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!

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Anyone make a change to the script to show usernames instead of usernumbers?

Joined: May 2002
Posts: 153
Member
Member
Offline
Joined: May 2002
Posts: 153
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

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
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.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
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).

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Very nice.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[]$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']);

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)