Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-12-2009, 12:39 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 47,971
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Alternate Images Taintedkitten Questions and Supports 3 01-10-2013 07:44 PM
multi breeding classes maximillion Suggestions and Feature Requests 4 09-08-2011 08:28 PM
Another multi-currency question. Tequila Questions and Supports 10 02-04-2011 10:00 PM
Multi-cash integration PTGigi Questions and Supports 4 02-02-2011 03:12 PM
AEF Multi AllMw2 Other Chat 5 06-02-2010 12:30 PM


All times are GMT -5. The time now is 11:14 AM.

Currently Active Users: 3836 (0 members and 3836 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636