diff --git a/modules/user.module b/modules/user.module
index 5129eb5570aa1dd4ac9525f6e831c55ec6a11a9d..3c307043f349a5ab8bd170088186d95e9965b30f 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1013,6 +1013,7 @@ function user_edit($edit = array()) {
     $output .= form_submit(t("Save user information"));
 
     $output = form($output, "post", 0, "enctype=\"multipart/form-data\"");
+      // the "enctype" attribute is required to upload files such as avatars
   }
   else {
     $output = user_login();
@@ -1480,7 +1481,7 @@ function user_admin_edit($edit = array()) {
 
       unset($edit["pass1"], $edit["pass2"]);
       if (!$error) {
-        $account = user_save($account, $edit);
+        $account = user_save($account, array_merge($edit, $data));
         $output .= status(t("your user information changes have been saved."));
       }
       else {
@@ -1527,7 +1528,7 @@ function user_admin_edit($edit = array()) {
     $output .= form_submit(t("Save account"));
     $output .= form_submit(t("Delete account"));
 
-    $output = form($output);
+    $output = form($output, "post", 0, "enctype=\"multipart/form-data\"");
 
   }
   else {
diff --git a/modules/user/user.module b/modules/user/user.module
index 5129eb5570aa1dd4ac9525f6e831c55ec6a11a9d..3c307043f349a5ab8bd170088186d95e9965b30f 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1013,6 +1013,7 @@ function user_edit($edit = array()) {
     $output .= form_submit(t("Save user information"));
 
     $output = form($output, "post", 0, "enctype=\"multipart/form-data\"");
+      // the "enctype" attribute is required to upload files such as avatars
   }
   else {
     $output = user_login();
@@ -1480,7 +1481,7 @@ function user_admin_edit($edit = array()) {
 
       unset($edit["pass1"], $edit["pass2"]);
       if (!$error) {
-        $account = user_save($account, $edit);
+        $account = user_save($account, array_merge($edit, $data));
         $output .= status(t("your user information changes have been saved."));
       }
       else {
@@ -1527,7 +1528,7 @@ function user_admin_edit($edit = array()) {
     $output .= form_submit(t("Save account"));
     $output .= form_submit(t("Delete account"));
 
-    $output = form($output);
+    $output = form($output, "post", 0, "enctype=\"multipart/form-data\"");
 
   }
   else {