Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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)
Comment | File | Size | Author |
---|---|---|---|
#1 | 2011182-og_node_access_order-1.patch | 608 bytes | hefox |
Comments
Comment #1
hefox CreditAttribution: hefox commentedif 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).
Comment #2
hefox CreditAttribution: hefox commentedComment #3
amitaibuCommitted, thanks.