Ticket #640 (fixed bug)
Renaming a user will unban them
- Created: 2012-03-16 11:58:04
- Reported by: Lanark
- Assigned to: Oldskool
- Milestone: 1.4.9
- Component: bans
- Priority: low
I just noticed that renaming a banned account (e.g. because it contains offensive words) will have the side effect of removing their ban.
It's not something that will happen very often but it is a bit counter intuitive.
Franz 2012-03-16 19:32:50
- Milestone set to 1.4.9.
Interesting find, thanks for the report!
We will take care of this in the next release.
Oldskool 2012-03-20 15:05:21
- Owner set to Oldskool.
Sounds interesting indeed, will further investigate this and come up with a fix. Thanks for your report!
Oldskool 2012-03-25 21:50:23
- Status changed from open to fixed.
All set, updated profile.php to update the bans table as well. Also regenerates the bans cache when a ban was actually updated, to avoid any caching problems. Thanks again for your report, Lanark. Good find!
Visman 2012-03-26 00:02:27
if ($db->query('UPDATE '.$db->prefix.'bans SET username=\''.$db->escape($form['username']).'\' WHERE username=\''.$db->escape($old_username).'\'') or error('Unable to update bans', __FILE__, __LINE__, $db->error()))
Here condition superfluous. Truth always, differently mistake.
Oldskool 2012-03-26 19:18:02
Obviously you are right Visman, just commited a proper update for that. Thanks for pointing it out!
PunKeel 2012-06-27 11:23:51
Hi, I haven't checked the code diff, but why not using ID (or a field in profile) to ban a member ?
It could be faster than an array, and keep bans in memory.
+ Ability to "edit" a ban, by clicking a button in admin panel.
PS: i use 1.2.x and haven't seen this, don't know if it's done in 1.5