summaryrefslogtreecommitdiff
path: root/modules/contact
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-22 07:50:16 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-22 07:50:16 +0000
commita4b833b6deb353d28ad51f9c648061bd0a83c950 (patch)
treefe74b4150ee226056d14062837bdd95fa9d06962 /modules/contact
parent77af195531d2c91ee6e48fb91b1218ed3844dbae (diff)
downloadbrdo-a4b833b6deb353d28ad51f9c648061bd0a83c950.tar.gz
brdo-a4b833b6deb353d28ad51f9c648061bd0a83c950.tar.bz2
- Patch #118345 by sun | nedjo, pwolanin, webchick: DIE hook_user_form() + hook_user_register() DIE!
Diffstat (limited to 'modules/contact')
-rw-r--r--modules/contact/contact.module10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index 80388d049..2cdb73077 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -145,10 +145,11 @@ function contact_load($cid) {
}
/**
- * Implement hook_user_form().
+ * Implement hook_form_FORM_ID_alter().
*/
-function contact_user_form(&$edit, $account, $category) {
- if ($category == 'account') {
+function contact_form_user_profile_form_alter(&$form, &$form_state) {
+ if ($form['#user_category'] == 'account') {
+ $account = $form['#user'];
$form['contact'] = array('#type' => 'fieldset',
'#title' => t('Contact settings'),
'#weight' => 5,
@@ -156,10 +157,9 @@ function contact_user_form(&$edit, $account, $category) {
);
$form['contact']['contact'] = array('#type' => 'checkbox',
'#title' => t('Personal contact form'),
- '#default_value' => !empty($edit['contact']) ? $edit['contact'] : FALSE,
+ '#default_value' => !empty($account->contact) ? $account->contact : FALSE,
'#description' => t('Allow other users to contact you via a <a href="@url">personal contact form</a> which keeps your e-mail address hidden. Note that some privileged users such as site administrators are still able to contact you even if you choose to disable this feature.', array('@url' => url("user/$account->uid/contact"))),
);
- return $form;
}
}