aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-03-12 16:12:41 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-03-12 16:12:41 +0000
commit355c62cd3c56d70220fadca01c1554c8fcd0b114 (patch)
treed2bc72db4898303e114a2324696866a650343ae4 /phpBB/includes/functions_user.php
parent07638ea5c11bbf3076e83896c7c38f8497980e75 (diff)
downloadforums-355c62cd3c56d70220fadca01c1554c8fcd0b114.tar
forums-355c62cd3c56d70220fadca01c1554c8fcd0b114.tar.gz
forums-355c62cd3c56d70220fadca01c1554c8fcd0b114.tar.bz2
forums-355c62cd3c56d70220fadca01c1554c8fcd0b114.tar.xz
forums-355c62cd3c56d70220fadca01c1554c8fcd0b114.zip
ok, this was a nasty one. :D Do not overwrite user ranks if the group rank is set to "user default". :o
git-svn-id: file:///svn/phpbb/trunk@7175 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index e3e376e287..1670a90a5f 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2331,6 +2331,12 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
continue;
}
+ // Do not update the rank if it is set to "user default"
+ if (strpos($attribute, 'group_rank') === 0 && !$group_attributes[$attribute])
+ {
+ continue;
+ }
+
settype($group_attributes[$attribute], $type);
$sql_ary[str_replace('group_', 'user_', $attribute)] = $group_attributes[$attribute];
}