summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/user.module5
-rw-r--r--modules/user/user.module5
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/user.module b/modules/user.module
index 50074db5d..f6708d939 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -111,7 +111,8 @@ function user_save($account, $array = array(), $category = 'account') {
$query .= "$key = '%s', ";
$v[] = $value;
}
- else {
+ else if ($key != 'roles') {
+ // Roles is a special case: it used below.
if ($value === null) {
// Setting a field to null deletes it from the data column.
unset($data[$key]);
@@ -1732,4 +1733,4 @@ function _user_forms(&$edit, $account, $category, $hook = 'form') {
return $output;
}
-?> \ No newline at end of file
+?>
diff --git a/modules/user/user.module b/modules/user/user.module
index 50074db5d..f6708d939 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -111,7 +111,8 @@ function user_save($account, $array = array(), $category = 'account') {
$query .= "$key = '%s', ";
$v[] = $value;
}
- else {
+ else if ($key != 'roles') {
+ // Roles is a special case: it used below.
if ($value === null) {
// Setting a field to null deletes it from the data column.
unset($data[$key]);
@@ -1732,4 +1733,4 @@ function _user_forms(&$edit, $account, $category, $hook = 'form') {
return $output;
}
-?> \ No newline at end of file
+?>