diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-05-01 08:47:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-05-01 08:47:20 +0000 |
commit | 0a74e0b32007406e870e4e92a371221e4bb1b942 (patch) | |
tree | a6f5cf093f13fdac2f918fe878244aa480d57ca1 | |
parent | e4d45aaef3458247082ae8560142f7b12761f86a (diff) | |
download | brdo-0a74e0b32007406e870e4e92a371221e4bb1b942.tar.gz brdo-0a74e0b32007406e870e4e92a371221e4bb1b942.tar.bz2 |
- Patch #6552 by Gerhard: fixed problem with user callbacks that slipped in with Natrak's last commit.
-rw-r--r-- | modules/user.module | 11 | ||||
-rw-r--r-- | modules/user/user.module | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/modules/user.module b/modules/user.module index 87429db67..2c07b5aa0 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1098,7 +1098,7 @@ function user_edit($edit = array()) { $output .= form_group(t('Picture'), $group); } - $output .= _user_profile($edit, $user); + $output .= _user_profile($edit, $user, 'form'); $output .= form_submit(t("Save user information")); $output = form($output, "post", 0, array("enctype" => "multipart/form-data")); @@ -1111,15 +1111,16 @@ function user_edit($edit = array()) { return $output; } -function _user_profile($edit, $account) { +function _user_profile($edit, $account, $mode = 'form') { foreach (module_list() as $module) { - if ($data = module_invoke($module, 'user', 'form', $edit, $account)) { + if ($data = module_invoke($module, 'user', $mode, $edit, $account)) { foreach ($data as $title => $form) { $groups[$title] .= $form; } } } + $output = ''; foreach ($groups as $title => $form) { $output .= form_group($title, $form); @@ -1330,7 +1331,7 @@ function user_admin_create($edit = array()) { $output = form_textfield(t("Username"), 'name', $edit['name'], 30, 55, t("Provide the username of the new account.")); $output .= form_textfield(t("E-mail address"), "mail", $edit['mail'], 30, 55, t("Provide the e-mail address associated with the new account.")); - $output .= _user_profile($edit, $edit); + $output .= _user_profile($edit, $edit, 'form'); $output .= form_textfield(t("Password"), 'pass', $edit['pass'], 30, 55, t("Provide a password for the new account.")); $output .= form_submit(t("Create account")); @@ -1640,7 +1641,7 @@ function user_admin_edit($edit = array()) { $output .= form_group(t('Picture'), $group); } - $output .= _user_profile($edit, $account); + $output .= _user_profile($edit, $account, 'edit'); $output .= form_submit(t("Save account")); $output .= form_submit(t("Delete account")); diff --git a/modules/user/user.module b/modules/user/user.module index 87429db67..2c07b5aa0 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1098,7 +1098,7 @@ function user_edit($edit = array()) { $output .= form_group(t('Picture'), $group); } - $output .= _user_profile($edit, $user); + $output .= _user_profile($edit, $user, 'form'); $output .= form_submit(t("Save user information")); $output = form($output, "post", 0, array("enctype" => "multipart/form-data")); @@ -1111,15 +1111,16 @@ function user_edit($edit = array()) { return $output; } -function _user_profile($edit, $account) { +function _user_profile($edit, $account, $mode = 'form') { foreach (module_list() as $module) { - if ($data = module_invoke($module, 'user', 'form', $edit, $account)) { + if ($data = module_invoke($module, 'user', $mode, $edit, $account)) { foreach ($data as $title => $form) { $groups[$title] .= $form; } } } + $output = ''; foreach ($groups as $title => $form) { $output .= form_group($title, $form); @@ -1330,7 +1331,7 @@ function user_admin_create($edit = array()) { $output = form_textfield(t("Username"), 'name', $edit['name'], 30, 55, t("Provide the username of the new account.")); $output .= form_textfield(t("E-mail address"), "mail", $edit['mail'], 30, 55, t("Provide the e-mail address associated with the new account.")); - $output .= _user_profile($edit, $edit); + $output .= _user_profile($edit, $edit, 'form'); $output .= form_textfield(t("Password"), 'pass', $edit['pass'], 30, 55, t("Provide a password for the new account.")); $output .= form_submit(t("Create account")); @@ -1640,7 +1641,7 @@ function user_admin_edit($edit = array()) { $output .= form_group(t('Picture'), $group); } - $output .= _user_profile($edit, $account); + $output .= _user_profile($edit, $account, 'edit'); $output .= form_submit(t("Save account")); $output .= form_submit(t("Delete account")); |