summaryrefslogtreecommitdiff
path: root/modules/contact
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-20 14:55:06 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-20 14:55:06 +0000
commit3b3f0966682cb69c5d701bb7d8f56fd3f479a961 (patch)
treea1ec13540dc355daedecc452d269616603feeee0 /modules/contact
parent883a870160354fae729e91293ab6cc7399f3e85c (diff)
downloadbrdo-3b3f0966682cb69c5d701bb7d8f56fd3f479a961.tar.gz
brdo-3b3f0966682cb69c5d701bb7d8f56fd3f479a961.tar.bz2
- Patch #721436 by catch, chx, moshe weitzman: remove magical fairy saving of cruft from user_save().
Diffstat (limited to 'modules/contact')
-rw-r--r--modules/contact/contact.module14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index 2bbf816bf..183a45c2b 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -168,13 +168,6 @@ function contact_load($cid) {
}
/**
- * Implements hook_user_insert().
- */
-function contact_user_insert(&$edit, $account, $category) {
- $edit['contact'] = variable_get('contact_default_status', 1);
-}
-
-/**
* Implements hook_mail().
*/
function contact_mail($key, &$message, $params) {
@@ -241,6 +234,13 @@ function contact_form_user_profile_form_alter(&$form, &$form_state) {
}
/**
+ * Implements hook_user_presave().
+ */
+function contact_user_presave(&$edit, $account, $category) {
+ $edit['data']['contact'] = isset($edit['contact']) ? $edit['contact'] : variable_get('contact_default_status', 1);
+}
+
+/**
* Implement of hook_form_FORM_ID_alter().
*
* Add the default personal contact setting on the user settings page.