Commit 54001aeb authored by Dries's avatar Dries

- Patch #817482 by Stevel, bfroehle: user_save() issues a warning when saving...

- Patch #817482 by Stevel, bfroehle: user_save() issues a warning when saving without changing mail attribute.
parent c57d8b7a
......@@ -562,7 +562,9 @@ function user_save($account, $edit = array(), $category = 'account') {
if (!isset($edit['created'])) {
$edit['created'] = REQUEST_TIME;
}
$edit['mail'] = trim($edit['mail']);
if (isset($edit['mail'])) {
$edit['mail'] = trim($edit['mail']);
}
$success = drupal_write_record('users', $edit);
if ($success === FALSE) {
// On a failed INSERT some other existing user's uid may be returned.
......
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