You are here

function _apply_for_role_apply_access in Apply for role 7

Same name and namespace in other branches
  1. 7.2 apply_for_role.module \_apply_for_role_apply_access()

Access callback for people/%user/apply_for_role.

1 string reference to '_apply_for_role_apply_access'
apply_for_role_menu in ./apply_for_role.module
Implements hook_menu().

File

./apply_for_role.module, line 166
Allows users to apply for roles.

Code

function _apply_for_role_apply_access($account) {

  // This path is only allowed for authenticated users looking at their own profile who have permission to apply for roles.
  return $account->uid && $GLOBALS['user']->uid == $account->uid && user_access('apply for roles', $account);
}