Here’s a video on how to limit the number of user votes per month.
Html bobswift |
---|
<iframe width="560" height="315" src="https://www.youtube.com/embed/dDn4eugpRH8" frameborder="0" gesture="media" allowfullscreen></iframe> |
Code Block |
---|
string [] votesMonth;
string userProps;
int month = month(currentDate()) - 1;
userProps = getUserProperty(currentUser(), "votesMonth");
if(isNotNull(userProps)) {
votesMonth = userProps;
if(isNotNull(votesMonth[month])) {
int count = votesMonth[month];
if(count >= 3) {
lfHide("votes");
}
}
} |