Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Multi Account (http://www.mysidiaadoptables.com/forum/showthread.php?t=1175)

jcga 11-12-2009 09:50 AM

Multi Account
 
I want know if there is anything to controll and bann to a user with multiaccount

Thank you so much

Arianna 11-12-2009 10:32 AM

RE: Multi Account
 
You can ban them normally, but I don't really know. I'm not sure if IPs are checked, but you could do a check to make sure that the email doesn't exist (while signing up) so that a user can't register twice. That might already be a feature, though.
If that's what you're thinking of, I can help with the code. :D

BMR777 11-12-2009 10:33 AM

RE: Multi Account
 
You mean ban a user with multiple accounts? You can delete users one at a time in the Admin CP, however there isn't currently a tool to ban multiple users or accounts at once.

Bloodrun 11-12-2009 12:39 PM

RE: Multi Account
 
MyBB doesn't even have the function to ban multiple users at the same time. But that doesn't mean it can't be done.

Also the solution to making only one account allowed per IP is fairly simple.

In your register.php find where it says"

PHP Code:

else {



//Grab the post data from the form



$status $_POST["status"];

$username $_POST["username"];

$pass1 $_POST["pass1"];

$pass2 $_POST["pass2"];

$email $_POST["email"];

$tos $_POST["tos"];

$hidden $_POST["hidden"];

$css2 $_POST["css2"];

$profilepic $_POST["profilepic"];

$displayquote $_POST["displayquote"]; 

And put this right below it:

PHP Code:

$ip=$_SERVER['REMOTE_ADDR']; 

Then place this somewhere in the register form:

PHP Code:

        <p><input name='ip' type='hidden' id='ip' value='".$ip."'></p


Then find the where it says

PHP Code:

    else{



    
//All checks are done, actually create the user's account on the database



    
$date date('Y-m-d');



        
mysql_query("INSERT INTO ".$prefix."users VALUES ( 


And place this at the end, but inside the perenthesis:

PHP Code:

'$ip' 

Thn go to your MySql Database and add at they very bottom of your adopts_users table this:

Code:

  `ip` varchar(20) NOT NULL,
Doing all this will get and store each users IP upon registration, to actually block a user from registering using the same IP find whereit says:

PHP Code:

    }

    else{



    
//We are attempting to register the user...



    //First MD5 hash the passwords:



    
$pass1 md5($pass1);

    
$pass2 md5($pass2); 

and right below it place this:

PHP Code:

    //Next check that the IP does not already exist...



    
$flag1 0;

    
$query "SELECT * FROM ".$prefix."users WHERE ip = '$ip'";

    
$result = @mysql_query($query);

    
$num1 = @mysql_numrows($result);



    if(
$num1 0){

    
$flag1 1;

    } 

Then find where it says:

PHP Code:

    else if($tos != "yes"){



    
//User did not agree to TOS

    
$article_title "Terms of Service Error";

    
$article_content $notos;



    } 

And right below it put this:

PHP Code:

    else if($flag1 0){



    
//IP already exists

    
$article_title "Multiple Accounts is not permitted on this website.";

    
$article_content $userexists;    



    } 

If you followed everything, this should work. To test it out, create two more test accounts. You should get a message saying that you are not allowed to have multiple accounts once you attempt to create the second account.


All times are GMT -5. The time now is 05:01 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.