Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
avatar_selection_access($op, $node, $account)
contributions/avatar_selection/avatar_selection.module, line 54
Implementation of hook_access().
Define what does each permission means : 'view' is included in the 'access avatars' permission; while 'create', 'update' and 'delete' are included in the 'administrer avatar selection'.
$op The action the user wants to do after the function checks the permission.
$node The node where the specific permission is requested.
The access needed to perform a certain operation.
<?php
function avatar_selection_access($op, $node, $account) {
if ($op == 'view') {
return user_access('access avatars');
}
else if ($op == 'create' || $op == 'update' || $op == 'delete') {
return user_access('administer avatar selection');
}
}
?>