Performance wise, looks like it's better to check $account->uid == $node->uid before og_user_access_entity("$op own $type content", 'node', $node, $account), since a simple comparison > a complex function that calls another that calls an alter hook, etc.

(from og_node_access)

CommentFileSizeAuthor
#1 2011182-og_node_access_order-1.patch608 byteshefox
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

Issue tags: +Performance
FileSize
608 bytes

if account->uid != node->uid, the permission check will not be done. Other than that there should be no functional difference (e.g. pure performance change).

hefox’s picture

Status: Active » Needs review
amitaibu’s picture

Status: Needs review » Fixed

Committed, thanks.

Automatically closed -- issue fixed for 2 weeks with no activity.