From 3b3f0966682cb69c5d701bb7d8f56fd3f479a961 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 20 Mar 2010 14:55:06 +0000 Subject: - Patch #721436 by catch, chx, moshe weitzman: remove magical fairy saving of cruft from user_save(). --- modules/contact/contact.module | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/contact') 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 @@ -167,13 +167,6 @@ function contact_load($cid) { ->fetchAssoc(); } -/** - * Implements hook_user_insert(). - */ -function contact_user_insert(&$edit, $account, $category) { - $edit['contact'] = variable_get('contact_default_status', 1); -} - /** * Implements hook_mail(). */ @@ -240,6 +233,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(). * -- cgit v1.2.3