You are here

function flickr_photos_access in Flickr 7

Same name and namespace in other branches
  1. 6 flickr.module \flickr_photos_access()

Flickr photo access.

3 string references to 'flickr_photos_access'
flickr_menu in ./flickr.module
Implements hook_menu().
flickr_sets_menu in sets/flickr_sets.module
Implements hook_menu().
flickr_tags_menu in tags/flickr_tags.module
Implements hook_menu().

File

./flickr.module, line 193
The Flickr module.

Code

function flickr_photos_access($account) {
  $view_access = FALSE;
  if (!empty($account) && !empty($account->uid)) {
    if (isset($account->flickr['nsid'])) {
      $view_access = user_access('administer flickr') || $account->status && (user_access('view all flickr photos') || user_access('view own flickr photos') && $GLOBALS['user']->uid == $account->uid);
    }
  }
  return $view_access;
}