In a custom module I wrote, I implemented hook_og_permission()
to define a new group permission.
/** * Implements hook_og_permission(). */ function logic_board_og_permission() { return array( 'rulesprm' => array( 'title' => t('Rules Form Perm'), 'description' => t("Allow og user to fill form"), ), ); }
I then use the following code to verify the user has that permission, to show some data.
if (user_access('rulesprm')) { // … }
The code doesn’t work. Even if the user has that permission, the code inside the if()
block isn’t executed. Why does this happen?
Sponsored by SupremePR