function _payment_own_overview_views_handler_access in Payment 7
Implements menu access callback.
Parameters
stdClass|null $account: The account for which to check access. Defaults to the currently logged-in user.
Return value
bool
See also
PaymentOwnOverviewViewsHandlerAccess::get_access_callback()
1 call to _payment_own_overview_views_handler_access()
- PaymentViewsHandlerAccessOwnPaymentOverview::access in views/
PaymentViewsHandlerAccessOwnPaymentOverview.inc - Determine if the current user has access or not.
1 string reference to '_payment_own_overview_views_handler_access'
- PaymentViewsHandlerAccessOwnPaymentOverview::get_access_callback in views/
PaymentViewsHandlerAccessOwnPaymentOverview.inc - Determine the access callback and arguments.
File
- ./
payment.module, line 1162 - Hook implementations and shared functions.
Code
function _payment_own_overview_views_handler_access($account = NULL) {
global $user;
if (!$account) {
$account = $user;
}
return user_access('payment.payment.view.any') || user_access('payment.payment.view.own') && $account->uid == arg(1);
}