You are here

function search_api_saved_search_create_personal_access in Search API Saved Searches 7

Access callback: Checks access for the user-specific "add search" page.

Parameters

object $account: The account whose "add search" page is visited.

Return value

boolean TRUE if the current user is allowed to create a new saved search using this page; FALSE otherwise.

1 string reference to 'search_api_saved_search_create_personal_access'
search_api_saved_searches_menu in ./search_api_saved_searches.module
Implements hook_menu().

File

./search_api_saved_searches.module, line 601
Offers the ability to save searches and be notified of new results.

Code

function search_api_saved_search_create_personal_access($account) {
  global $user;
  if (user_access('administer search_api_saved_searches')) {
    return TRUE;
  }
  if ($account->uid !== $user->uid) {
    return FALSE;
  }
  return search_api_saved_search_create_access(NULL, TRUE);
}