aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html2
-rw-r--r--phpBB/includes/functions_user.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 8212b0c7f4..3cc2421fd4 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -268,7 +268,7 @@ p a {
<li>[Fix] Allow for polls to work during preview (Bug #13657) - thanks to Thatbitextra</li>
<li>[Fix] Finer error conditions for sending IM messages (Bugs #13681, #13683)</li>
<li>[Fix] Add a confirmation for log deletion in the MCP (Bug #13693)</li>
-
+ <li>[Fix] Do not erase ranks and avatars when changing default groups (Bugs #13701, #13697)</li>
</ul>
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 4de247d33c..35c3ace106 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2396,7 +2396,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
if (sizeof($user_ary))
{
- group_set_user_default($group_id, $user_ary, $sql_ary);
+ group_set_user_default($group_id, $user_ary, $sql_ary, false, true);
}
}
@@ -2893,7 +2893,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)
+function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false, $same_group = false)
{
global $db;
@@ -2930,8 +2930,8 @@ 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, we will not overwrite user avatars if no group avatar is set...
- if (strpos($attribute, 'group_avatar') === 0 && !$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])
{
continue;
}