From 44a216f8fbf7211b023a0d301c107e501f0e7eaf Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 24 Apr 2011 01:40:28 -0700 Subject: Issue #817482 by Stevel, bfroehle: user_save() issues a warning when saving without changing mail attribute. --- modules/user/user.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/user/user.module b/modules/user/user.module index d33ddaa9b..358b4cec5 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -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. -- cgit v1.2.3