Commit 55205138 authored by Dries's avatar Dries

- Modified patch by Goba: don't save user roles in the serialized data field of the user table.

parent 3d491def
......@@ -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
?>
......@@ -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
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment