Skip to end of banner
Go to start of banner

Limit the number of user votes per month

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Here’s a video on how to limit the number of user votes per month.

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");
        }
    }
}
  • No labels