You are here

function _tracker_user_access in Drupal 8

Same name and namespace in other branches
  1. 6 modules/tracker/tracker.module \_tracker_user_access()
  2. 7 modules/tracker/tracker.module \_tracker_user_access()

Access callback: Determines access permission for an account.

@internal

Parameters

int $account: The user account ID to track.

Return value

bool TRUE if a user has permission to access the account for $account and has permission to access the content.

Deprecated

in drupal:8.4.0 and is removed from drupal:9.0.0. As internal API, _tracker_user_access() may also be removed in a minor release.

File

core/modules/tracker/tracker.module, line 177
Tracks recent content posted by a user or users.

Code

function _tracker_user_access($account) {
  @trigger_error('_tracker_user_access() is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0.', E_USER_DEPRECATED);
  return $account
    ->access('view') && $account
    ->hasPermission('access content');
}