You are here

function fb_user_access_own in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb_user.module \fb_user_access_own()
  2. 6.2 fb_user.module \fb_user_access_own()

Helper function for menu item access check.

File

./fb_user.module, line 664
This module manages relations between local Drupal user accounts and their accounts on facebook.com.

Code

function fb_user_access_own($account, $perm, $allow_admin) {
  if ($GLOBALS['user']->uid == $account->uid && user_access($perm)) {
    return TRUE;
  }
  elseif ($allow_admin) {
    return user_access('administer users');
  }
}