From 06fbe8e90ce3272b4879dc967b95bd6937875dc8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 12 Aug 2009 12:36:05 +0000 Subject: - Patch #491972 by Berdir, webchick: clean-up of user/profile related hooks and APIs. --- modules/contact/contact.module | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'modules/contact') diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 1cbbec704..7ee6936d0 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -138,7 +138,7 @@ function contact_load($cid) { /** * Implement hook_user_form(). */ -function contact_user_form(&$edit, &$user, $category = NULL) { +function contact_user_form(&$edit, $account, $category) { if ($category == 'account') { $form['contact'] = array('#type' => 'fieldset', '#title' => t('Contact settings'), @@ -148,7 +148,7 @@ function contact_user_form(&$edit, &$user, $category = NULL) { $form['contact']['contact'] = array('#type' => 'checkbox', '#title' => t('Personal contact form'), '#default_value' => !empty($edit['contact']) ? $edit['contact'] : FALSE, - '#description' => t('Allow other users to contact you via a personal contact form 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/$user->uid/contact"))), + '#description' => t('Allow other users to contact you via a personal contact form 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; } @@ -157,17 +157,10 @@ function contact_user_form(&$edit, &$user, $category = NULL) { /** * Implement hook_user_insert(). */ -function contact_user_insert(&$edit, &$user, $category = NULL) { +function contact_user_insert(&$edit, $account, $category) { $edit['contact'] = variable_get('contact_default_status', 1); } -/** - * Implement hook_user_validate(). - */ -function contact_user_validate(&$edit, &$user, $category = NULL) { - return array('contact' => isset($edit['contact']) ? $edit['contact'] : FALSE); -} - /** * Implement hook_mail(). */ -- cgit v1.2.3