function vud_can_vote in Vote Up/Down 8
Check if the passed user can vote.
Parameters
$account: Entity object of an User
Return value
bool
2 calls to vud_can_vote()
- VoteUpDownWidgetBase::build in src/
Plugin/ VoteUpDownWidgetBase.php - @fixme Do not use camelcase on variables, and fix coding standards.
- VotingApiController::voteAccess in src/
Controller/ VotingApiController.php - Checks if the currentUser is allowed to vote.
File
- ./
vud.module, line 19 - Implements the core voting module on top of Voting API.
Code
function vud_can_vote($account) {
return $account
->hasPermission('use vote up/down');
}