I would like to allow users to access their private messages from their user account pages, so I'd like the URL to be, universally, user/%user/messages.

It looks like, in D6, there was an admin setting to allow the choosing of an arbitrary path (instead of /messages) at which the user could view his messages. I was wondering if this setting will be reappearing.

From #959632: Setting Base URL path to anything else that "/messages" leads to Access denied on messages pages:

Note that you can change the default URL in the administration settings (it is also possible to move it below /user/uid) but that actually *moves* it, which means that /messages is no longer available.

Comments

geerlingguy’s picture

Status: Active » Needs review
StatusFileSize
new490 bytes

For a simple fix, see attached patch. For the needs of my site, simply allowing the user access to messages on his own page is good enough. However, for many sites, I would presume the ability to have the entire private messages interface accessible from the account page would be ideal.

This patch just lets the user see his own user/[uid]/messages page.

Status: Needs review » Needs work

The last submitted patch, allow_user_messages-1217280-1.patch, failed testing.

geerlingguy’s picture

Status: Needs work » Needs review
StatusFileSize
new1.33 KB

Umm, yeah... the patch above basically allows anyone to view anyone else's messages list. That's not good :-/

So, the attached patch only allows the current user to view his own messages. The logic in that user access function is pretty crazy, in some ways (kind of a mini permissions system for the privatemsg module), but I understand the reason for the complexity.

Anyways, I still just want to be able to let users get to their private messages right on their profile pages :)

Status: Needs review » Needs work

The last submitted patch, allow_user_messages-1217280-3.patch, failed testing.

mefisto75’s picture

sub

geerlingguy’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
StatusFileSize
new1.41 KB

Yeah... just realized the patch didn't allow people to view other people's message lists, but DID allow people to view other people's threads (even worse!). This is still a somewhat hackish attempt, but it works for my site.

geerlingguy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, allow_user_messages-1217280-6.patch, failed testing.

ptmkenny’s picture

Status: Needs work » Needs review

#6: allow_user_messages-1217280-6.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, allow_user_messages-1217280-6.patch, failed testing.

ptmkenny’s picture

Potentially related issue: http://drupal.org/node/1772236

ptmkenny’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: bug » feature
ptmkenny’s picture

Potential solution (and patch) here: https://drupal.org/node/1772236

It does not allow the path to be changed, but instead provides user/%user/messages as the path.

ptmkenny’s picture