You are here

function media_youtube_access in Media: YouTube 7.2

Determine if a user may perform the given operation on the specified file.

Enables compatibility with Media 1.x and 2.x by providing a wrapper around both media_access() and file_entity_access().

Return value

boolean TRUE if the operation may be performed, FALSE otherwise.

See also

media_access()

file_entity_access()

1 call to media_youtube_access()
media_youtube_add_submit in ./media_youtube.module
@TODO: Document this function.

File

./media_youtube.module, line 352
Provides a stream wrapper and formatters appropriate for accessing and displaying YouTube videos.

Code

function media_youtube_access($op, $file = NULL, $account = NULL) {
  if (function_exists('file_entity_access')) {
    $access = file_entity_access($op, $file, $account);
  }
  elseif (function_exists('media_access')) {
    $access = media_access($op, $account);
  }
  else {
    $access = FALSE;
  }
  return $access;
}