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.
Good work Dave... except there's no file.
You have been a busy beaver tonight.
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
Just a note, this is installed here and we know who you are...
LoL just kidding...
maybe...
LoL
We have ways of making you talk. Muhahahaha
Cool one I tested and works perfectly.
JustDave is da man!!
Very
!
Thanks!
hehe... updated it already.
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...?
Only couple of hours have passed and you made this mod
Thaaanks
works wonderfully JustDave, thanks again
Using IIP you can match users that have the same IP address by using wild cards * in place of the .
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?
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.
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
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.
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.
[]
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:
<br /> else {<br /> $tempID = ${$config['cookieprefix']."IDstack"};<br />
Change to this:
<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
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"
I think a small change is needed in the code so that user number 15 won't match up to 156. Change this:
<br /> elseif (!stristr(",{$config['allowed_dupes']},","{$user['U_Number']}")) {<br /> $tempID = ${$config['cookieprefix']."IDstack"};<br />
Into this:
<br /><br /> elseif (!stristr(",{$config['allowed_dupes']},",",{$user['U_Number']},")) {<br /> $tempID = ${$config['cookieprefix']."IDstack"};<br />
Ah yes... the trailing comma.
Thank you. Good eye.
You can now join Dave_L in the Eagle Eye club
.
Actually there has to be a comma both before and after, as in my example, otherwise it might match 123 with 3123. =]
Yes. I remember that. You and dave helped me figure that out in teh PHP forum. I just was forgetful/careless.
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?
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?
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
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!
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.
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!
Hi,
Thanks Josh, that seemed to have done the trick.
Sanuk!
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!
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
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.
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:
<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.
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.
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).
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.
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&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
Very nice.
[]$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']);
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.
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>
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.
hmmm i installed on 6.3 but does not seem to be working, anyone else tried this on 6.3?
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.
Yeah, I thought this worked fine in 6.3.
I am a twit.
I forgot that I'd cleared my cookies, and that's why it didn't work.
Free donuts for everyone.
With some slight modifications I got this to work with 6.1 as well. Great mod!
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.
[]
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!
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?
did you add the language files ?
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!
Is this working vith 6,4 ???
thomas
Hi,
Yes, using it with 6.4b1. Already caught 2 users
Sanuk!
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
Never mind - we got it working. Thanks anyway.
Rose