user_ban: returning true but doing nothing

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Registered User
Posts: 1
Joined: Wed Jan 30, 2013 4:06 pm

user_ban: returning true but doing nothing

Post by GenuineCorruption »

I am attempting to make a slight modification to Nelsaidi's infractions mod so that it bans users if they have a set number of infraction points (numbers hard coded in as that's just the easiest way to do it).

user_ban("user", $user_row["username"], -1, "2013-02-02", false, 0, "ban test", "test ban");
User is not banned. Function returns true (or 1) though, because I passed this function through trigger_error() just to confirm.

user_ban("user", "test", -1, "2013-02-02", false, 0, "ban test", "test ban");
Still not banned.
The ban by minutes option isn't working either.
I have also included the following at the beginning of the issue function:
What am I missing. I'm pretty new to PHP, though I've been coding for windows platforms for years so I have the theory down.
Last edited by marian0810 on Thu Jan 31, 2013 6:56 pm, edited 1 time in total.
Reason: dupe of