Topic: User ban bug

I decided to try to ban a test-user.
I wondered what does he see, when log in.
I saw.  I tried to logout (and to login back as myself). But I couldn't logout! Nothing helped!
To do so I had to kill all cookies on my comp. Very unconvinient - gonna loose time on many other sites now.

The bug is: Bannned user can't logoff !   (So if I can't delete all cokies the computer will never access the forum, once banned user used it!)

2

Re: User ban bug

This was explained a few weeks ago. If a user is banned you don't want them logging out and registering again.

Re: User ban bug

druidk wrote:

Very unconvinient

Exactly. That's the point.

druidk wrote:

gonna loose time on many other sites now.

Huh?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: User ban bug

To do so I had to kill all cookies on my comp

No, even if you're using IE you can go in and find the cookie (and Firefox comes with the ability to browse/delete built in, I think)

5

Re: User ban bug

Both Firefox and Opera have cookie managers for selective removal.

I'm moving this to troubleshooting as it isn't a bug, everything worked the way it was supposed to.

Re: User ban bug

OK, got You.

But maybe it's worth to right a kind of warning while banning, to avoid such situations as mine smile.

Re: User ban bug

druidk wrote:

OK, got You.

But maybe it's worth to right a kind of warning while banning, to avoid such situations as mine smile.

Or just don't ban yourself tongue

Re: User ban bug

What will happen when I use common.php for whole web (punbb integrate) and I ban any user? He will not be able to access whole web. And does not matter if I set PUN_TURN_OFF_MAINT and PUN_QUIET_VISIT. But I want he has access to web root. Logout could help, but it is not the right solution and it is not possible with ban.

Where did I do a mistake? sad

Re: User ban bug

What you have to do is put an if statement around this:

// Check if current user is banned
check_bans();

So that it isn't checked if the user isn't in the forum

10

Re: User ban bug

Thank you for your advice. I had to create new constant PUN_BAN_ALLOW. Forum works with/changes PUN_QUITE_VISIT somewhere and it didn't work.

define('PUN_BAN_ALLOW', 0);

// Check if current user is banned
if (PUN_BAN_ALLOW) {
    check_bans();
}

Shouldn't it be something like this in code permanently? For example for better integration and avoiding described problems.