summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-12-08 19:41:16 +0000
committerDries Buytaert <dries@buytaert.net>2004-12-08 19:41:16 +0000
commit55205138796b6f9c0b8914053b569ed1e71186b2 (patch)
tree96950f1b8ab40ba312526d236534a49a808de9d5
parent3d491defbde0dff775cbfab99628f8af6f00c8aa (diff)
downloadbrdo-55205138796b6f9c0b8914053b569ed1e71186b2.tar.gz
brdo-55205138796b6f9c0b8914053b569ed1e71186b2.tar.bz2
- Modified patch by Goba: don't save user roles in the serialized data field of the user table.
-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
+?>