Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
contact.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Apr 2006 at 13:14 UTC
Updated:
12 Jun 2006 at 14:32 UTC
Jump to comment: Most recent file
Users who have their 'Personal contact form' un-checked still display a 'contact' tab when viewing their profile which serves no purpose.
An admin should be able to disable users even seeing this option in their user profile to begin with.
Patch adds a permission for admin to control what user roles get the change to use the personal contact form now.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | contact_form_hide.patch | 2.28 KB | webchick |
| #11 | contact.module_23.patch | 1.67 KB | webchick |
| #4 | _60483_comment_tab_2.patch | 1.64 KB | morbus iff |
| #3 | _60483_comment_tab_1.patch | 1.68 KB | morbus iff |
| #2 | _60483_comment_tab_0.patch | 1.39 KB | morbus iff |
Comments
Comment #1
morbus iffYou're talking about two different things.
* BUG: The tab shows up regardless of whether the user has asked to be contacted.
* SOLUTION: Stop the tab from showing up when the user has asked to not be contacted.
Your solution is a feature request, and doesn't actually solve the bug at all - it just pushes the responsibility onto the admin: "if you don't want the tab to show up, remove the ability for ANY user to be contacted". That's just wrong. Attached is a patch that actually solves the bug, without adding new features.
Comment #2
morbus iffSame patch, just twiddled the location of the access check.
Comment #3
morbus iffHrm, we shouldn't even build the menu item. This requires an if not an access check.
Comment #4
morbus iffGrr.
Comment #5
buddaThe contact tab has gone.
+1
Comment #6
morbus iffComment #7
dries commentedI like the current behavior better:
Comment #8
morbus iffI'll agree #2 needs to be fixed. I disagree on #1. That's like saying "Let's show every user every administer link, to let them know that the functionality exists, but we'll just show them an error message when they try to access it" - it's the proverbial "shatter the hopes and dreams" problem - give the user the appearance that they have that option, and then shatter it by saying "just kidding".
Comment #9
Zen commentedhttp://drupal.org/node/41352 might make #1 in Dries' last post (partially) moot. I'll reroll that patch shortly.
-K
Comment #10
webchickyeah, this is bugging me. leaving my mark so I can roll a patch later. ;)
Comment #11
webchickThis patch is essentially the same as Morbus's, except that it does not hide the contact form for people with "administer users" privileges.
I also disagree with leaving the tab there when it does nothing. We don't show "edit" tabs on every node, only those the user has edit permissions on. This is the same thing, imo. And now that the patch got in to make contact forms enabled by default, it should hopefully be fairly obvious that if a contact form is disabled it means the user doesn't want to be bothered by people.
Comment #12
webchickActually... looks like we can remove some of this access check stuff from contact_mail_user as well, now that this is handled @ hook_menu.
Comment #13
webchickComment #14
webchickComment #15
dries commentedOK, I agree. Code looks cleaner too! Committed to CVS HEAD. Thanks.
Comment #16
dries commentedComment #17
(not verified) commented