summaryrefslogtreecommitdiff
path: root/modules/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-07 16:59:34 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-07 16:59:34 +0000
commite28bbf67397166b7256150301a1c4e931ea8314b (patch)
treed632581c73f3409a9efe92037b48ae5bdca525e4 /modules/user.module
parent5a8129e0fbf762c9dc6891d574dac386e959c262 (diff)
downloadbrdo-e28bbf67397166b7256150301a1c4e931ea8314b.tar.gz
brdo-e28bbf67397166b7256150301a1c4e931ea8314b.tar.bz2
- Batch two with profile module improvements:
+ Reworked the 'account administration' page. + Fixed bug in the 'edit account' page. + Removed some dead code from the system.module.
Diffstat (limited to 'modules/user.module')
-rw-r--r--modules/user.module14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/user.module b/modules/user.module
index a46fe3809..75eca8a87 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -951,7 +951,7 @@ function user_edit($edit = array()) {
$output .= form_textfield(t("E-mail address"), "mail", $edit['mail'], 30, 55, t("Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail."));
$output .= form_item(t("Password"), "<input type=\"password\" name=\"edit[pass1]\" size=\"12\" maxlength=\"24\" /> <input type=\"password\" name=\"edit[pass2]\" size=\"12\" maxlength=\"24\" />", t("Enter your new password twice if you want to change your current password or leave it blank if you are happy with your current password."));
$output = form_group(t('Account information'), $output);
- $output .= _user_settings();
+ $output .= _user_profile($user);
$output .= form_submit(t("Save user information"));
$output = form($output, "post", 0, array("enctype" => "multipart/form-data"));
@@ -964,10 +964,10 @@ function user_edit($edit = array()) {
return $output;
}
-function _user_settings($style = 'edit_form') {
+function _user_profile($account) {
foreach (module_list() as $module) {
- if ($data = module_invoke($module, 'user', $style, $edit, $user)) {
+ if ($data = module_invoke($module, 'user', 'edit_form', $edit, $account)) {
foreach ($data as $title => $form) {
$groups[$title] .= $form;
}
@@ -1433,13 +1433,13 @@ function user_admin_edit($edit = array()) {
$output .= form_item(t("User ID"), $account->uid);
$output .= form_textfield(t("Username"), 'name', $account->name, 30, 55, t("Your full name or your preferred username: only letters, numbers and spaces are allowed."));
$output .= form_textfield(t("E-mail address"), "mail", $account->mail, 30, 55, t("Insert a valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail."));
-
- $output .= implode("\n", module_invoke_all('user', "edit_form", $edit, $account));
-
$output .= form_item(t("Password"), "<input type=\"password\" name=\"edit[pass1]\" size=\"12\" maxlength=\"24\" /> <input type=\"password\" name=\"edit[pass2]\" size=\"12\" maxlength=\"24\" />", t("Enter a new password twice if you want to change the current password for this user or leave it blank if you are happy with the current password."));
- $output .= form_radios(t("Status"), "status", $account->status, array(t("blocked"), t("active")));
+ $output .= form_radios(t("Status"), "status", $account->status, array(t("Blocked"), t("Active")));
$output .= form_radios(t("Role"), "rid", $account->rid, user_roles(1));
+ $output = form_group(t('Account information'), $output);
+ $output .= _user_profile($account);
+
$output .= form_submit(t("Save account"));
$output .= form_submit(t("Delete account"));