Closed (fixed)
Project:
Privatemsg
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2009 at 22:21 UTC
Updated:
15 May 2012 at 04:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdirThat link is not added by privatemsg.module, it comes from the Messaging module "Simple messaging". Chances are quite high that you don't want that enabled at all...
Comment #2
entr3p commentedI don't have that module installed at all.
That tab IS added by Privatemsg. It goes to "/user/*/messages" which pretty much goes to the same page as "messages" but without the ability to send messages.
The "messages" tab is located right next to the "Edit" tab in the profile page.
How the tabs look like on the profile page:
"View" "Edit" "Messages" --> Leads to messages page of Privatemsg.
EDIT#
I was able to disable the "Messages" tab by adding this to a custom module which uses menu_alter:
$items['user/%/messages']['type'] = MENU_CALLBACK;
It would be nice if there can be a settings to turn it off/on so that newbies don't have to go on to something too "advanced" for something so simple.
Comment #3
naheemsays commentedIt was added by #298502: Better access to another user's messages and having the ability to turn it off for your own user may be a good idea.
Comment #4
berdirUhm, sorry for reacting too fast, forgot that one...
I'm wondering, do we really want to display that link to users (those without read all permission)? Displaying that doesn't help much since all links point to /messages anyway, they can reach that url only manually, so...
I know that there are feature requests that want exactly this, but the thing is that it is very limited and still needs /messages, it can only be accessed manually. Maybe #561036: Conflicting URL scheme will make it possible to *move* the link below /user/%user (not the current patch, but the way i'd like to implement it).
Comment #5
naheemsays commentedI have no real concerns either way - I think it can be got rid of pretty easily - delete the privatemsg_user_tab_access() function and then make the access callback do a straightforward access check.
Comment #6
berdirThe attached patch should get hide the messages unless you have read all private messages permission.
Note that you need to visit admin/build/modules to rebuild the menu.
Comment #7
berdirFixed in 6.x-1.x-dev and 7.x-1·x-dev.
Comment #9
Ashraf Amayreh commentedOut of curiosity. How was removing the tab a good idea? I know many users might want to put that URL wherever they want without being restricted to a tab.
But in a normal installation, if I go to some user's profile and send him a private message, then that user logs in, he'll see a message "1 unread message" or something. If he refreshes his browser, no more message notification and nowhere he can go to see his messages since there's no tab or anything in the UI to take him to his inbox... Or do I totally understand this wrong?
Comment #10
Ashraf Amayreh commentedSpoke too soon. Just saw the block. Although I would think some message after installation would be quite helpful to guide the normal user to it.