diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 094ba562fb..274c8bdc2f 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -202,6 +202,7 @@ p a { <li>[Fix] Properly display ban reason if selecting banned entries within the ACP (Bug #13896)</li> <li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li> <li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li> + <li>[Fix] Always remove avatars/ranks when leaving a group. (Bug 13961)</li> </ul> diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 2decddb54f..3d6e3d351a 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2710,7 +2710,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, { if (isset($sql_where_ary[$gid]) && sizeof($sql_where_ary[$gid])) { - group_set_user_default($gid, $sql_where_ary[$gid], $special_group_data[$gid]); + group_set_user_default($gid, $sql_where_ary[$gid], $special_group_data[$gid], false, true); } } unset($special_group_data); @@ -2892,7 +2892,7 @@ function group_validate_groupname($group_id, $group_name) * * @private */ -function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false, $same_group = false) +function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false, $overwrite = false) { global $db; @@ -2930,7 +2930,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal if (isset($group_attributes[$attribute])) { // If we are about to set an avatar or rank, we will not overwrite with empty, unless we are not actually changing the default group - if (!$same_group && (strpos($attribute, 'group_avatar') === 0 || strpos($attribute, 'group_rank') === 0) && !$group_attributes[$attribute]) + if (!$overwrite && (strpos($attribute, 'group_avatar') === 0 || strpos($attribute, 'group_rank') === 0) && !$group_attributes[$attribute]) { continue; } |