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.4.2.x
parent
222e1e5583
commit
cf5a17ca0d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue