Paul and me recently changed some letters by e-mail. I was interested how exactly banning works, becase the names of the columns in the database was not absolutely clear for me. At the end Paul said: I would prefer if we discuss such questions on forums :-)
So I put here the two last letters, because the matter might be of someone other's interest.
Hi Paul :)
Thanks for the correction in the code for "All forums moderator". Yes, that was the reason and now all is OK :)
> ID in the banned table means system ID which is used for internal
> purposes. You don't need to pay attention to it at all.
> "why the IDs are in the place of the IPs" - I don't understand this
> question. They are there because you have entered them :-) When you
> have entered user ID in the banned table, his IP is not taken into
> attention at all. Whatever IP he logs from, he can't do so, because
> his member account is actually blocked, not IP.
Please confirm if I understand right.
1. The ID number in the column "id" is a separate, different ID that the script and the database give to the user for their own internal use, and I don't need to think about it.
2. In the column "banip", despite its name, there could be both the real ID or/and the IP of the banned user.
3. When I ban a user, the script recognizes by the structure of the data I enter if it is an IP or ID (may be when it has only one group of numbers and has not a dot after it, or something like that), or simply writes the entered data in the column. When a user tries to log in, it reads his ID and IP, and if exists - stops him.
I have ID 155 and I'm banned as user 155. Than I cannot enter with my user name/password, because they are to the user 155. In the same time another user with IP 18.104.22.168 can enter without problems, because for banning him, the entered data must be "155.", "155.44.", "155.44.1." or "22.214.171.124" - i. e. to stop an IP, the script must find in the column 1, 2 or 3 groups of numbers with 1, 2 or 3 dots respectively, or 4 groups of numbers with 3 dots.
All the best from