You are here

function flag_user::type_access_multiple in Flag 7.2

Same name and namespace in other branches
  1. 6.2 flag.inc \flag_user::type_access_multiple()
  2. 7.3 includes/flag/flag_user.inc \flag_user::type_access_multiple()

File

./flag.inc, line 1808
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_user
Implements a user flag.

Code

function type_access_multiple($content_ids, $account) {
  $access = array();

  // Exclude anonymous.
  if (array_key_exists(0, $content_ids)) {
    $access[0] = FALSE;
  }

  // Prevent users from flagging themselves.
  if ($this->access_uid == 'others' && array_key_exists($account->uid, $content_ids)) {
    $access[$account->uid] = FALSE;
  }
  return $access;
}