You are here

function messaging_simple_access in Messaging 7

Same name and namespace in other branches
  1. 6.4 messaging_simple/messaging_simple.module \messaging_simple_access()
  2. 6 messaging_simple/messaging_simple.module \messaging_simple_access()
  3. 6.2 messaging_simple/messaging_simple.module \messaging_simple_access()
  4. 6.3 messaging_simple/messaging_simple.module \messaging_simple_access()

Access calback

1 string reference to 'messaging_simple_access'
messaging_simple_menu in messaging_simple/messaging_simple.module
Implementation of hook_menu().

File

messaging_simple/messaging_simple.module, line 55
Simple messaging using html page. Messaging method plug-in

Code

function messaging_simple_access($account, $message = NULL) {
  global $user;
  if ($message) {
    return $message->uid == $user->uid || user_access('administer messaging');
  }
  else {
    return $account->uid && ($account->uid == $user->uid || user_access('administer messaging'));
  }
}