function timeline_bookmark_delete_check in MediaFront 7.2
Performs a check to make sure this user can delete content from a playlist.
Parameters
type $account:
type $playlist:
type $content:
Return value
type
2 calls to timeline_bookmark_delete_check()
- timeline_bookmark_delete_confirm in modules/
timeline_bookmark/ timeline_bookmark.module - Confirmation page for the timeline bookmark delete.
- timeline_bookmark_delete_confirm_submit in modules/
timeline_bookmark/ timeline_bookmark.module - The confirmation delete.
File
- modules/
timeline_bookmark/ timeline_bookmark.module, line 221
Code
function timeline_bookmark_delete_check($account, $bookmark) {
global $user;
// First, check to make sure we have content.
if (empty($bookmark->bid)) {
drupal_set_message("No bookmark provided", "error");
return FALSE;
}
// Check to make sure an account was provided.
if (empty($account->uid)) {
drupal_set_message("No account provided", "error");
return FALSE;
}
// Check to make sure the user is logged in or is admin.
if ($user->uid != $account->uid && !user_access("administer nodes")) {
drupal_set_message("You do not have permission to delete this bookmark.", "error");
return FALSE;
}
return TRUE;
}