You are here

function privatemsg_view_access in Privatemsg 6

Same name and namespace in other branches
  1. 6.2 privatemsg.module \privatemsg_view_access()
  2. 7.2 privatemsg.module \privatemsg_view_access()
  3. 7 privatemsg.module \privatemsg_view_access()

Check access to the view messages page.

Function to restrict the access of the view messages page to just the messages/view/% pages and not to leave tabs artifact on other lower level pages such as the messages/new/%.

Related topics

1 string reference to 'privatemsg_view_access'
privatemsg_menu in ./privatemsg.module
Implements hook_menu().

File

./privatemsg.module, line 241
Allows users to send private messages to other users.

Code

function privatemsg_view_access() {
  if (privatemsg_user_access('read privatemsg') && arg(1) == 'view') {
    return TRUE;
  }
  return FALSE;
}