Commit cf5a17ca authored by Dries's avatar Dries

Patch be Matt Westgate:

- Bugfix: in the user_admin_edit() function, the data array returned from the callback modules was not being merged into the edit array.

- Bugfix: added enctype="multipart/form-data" to the form tag so that we can update things like the avatar image in the admin interface.
parent 222e1e55
......@@ -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 {
......
......@@ -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 {
......
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