Help with keeping members IP limited to 1 account

Forum
Last Post
Threads / Messages

GeneticAlpha

Loving Mysidia!
Member
Joined
May 24, 2020
Messages
283
Points
18
Age
30
Location
Tennessee
Mysidian Dollar
13,356
I was hoping to get some help on a step-by-step how I might could make things to where a user can only have 1 account per IP address or approval or something. To keep users from using the loop hole of making multiple accounts to keep getting extra starting currency. :)
 
Just do a rowCount on the IP address column for your user table:

PHP:
        $currentIP = $_SERVER['REMOTE_ADDR'];
        $ipCount = $mysidia->db->select("users", [], "ip = '{$currentIP}'")->rowCount();
        if($ipCount > 0) throw new Exception("A user with the same IP address has already signed up on our site.");
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,267
Messages
33,048
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top