function flag_user::type_access in Flag 7.3
Same name and namespace in other branches
- 6.2 flag.inc \flag_user::type_access()
- 7.2 flag.inc \flag_user::type_access()
Implements access() implemented by each child class.
@abstract
Return value
FALSE if access should be denied, or NULL if there is no restriction to be made. This should NOT return TRUE.
Overrides flag_flag::type_access
File
- includes/
flag/ flag_user.inc, line 55 - Contains the flag_user class.
Class
- flag_user
- Implements a user flag.
Code
function type_access($entity_id, $action, $account) {
// Prevent users from flagging themselves.
if ($this->access_uid == 'others' && $entity_id == $account->uid) {
return FALSE;
}
}