A question for the experienced on Sitelok

A question for the experienced on Sitelok:
Is it possible that for a given group each user can log in only once?

Thanks in advance

You could add a button to the page that, when clicked, removes them from that particular group. What is it that you want the user to do just once?

Thanks Mark for your kind response. What I am trying to do is a voting system that allows each registered member to vote only once.

That should be fairly easy to set up. Create a “NotVoted” group to contain those that have not yet voted, (you can automatically add new users to this group when they register). Make the voting page only accessible to the “NotVoted” group. Once they have voted, have a button that says something like “click to continue” and attach the code to that button for removing them from the “NotVoted” group.

<input type="hidden" name="modifygroup[]" value="<?php removegroupinput("NotVoted"); ?>">

In fact, you could also store their choice of vote in a Custom field, should you want to keep a running tally of the vote.

Thanks Mark!
I am planning the voting form in Formloom3. Do you think that when the user sends the form, it is automatically redirected to a page where the button that you suggest is? Could be a text like “click to finish the vote”?

Makes sense?

Best regards

Sounds like it should work. Perhaps a slicker method would to have the Sitelok php integrated into the Formloom “submit” button. Not sure if this is feasible or not, @vibralogix or the Formloom developer (Yabdab?) may be able to give some guidance.

I don’t use Formloom myself.

Yes Mark, I’ve been thinking about some kind of integration, but it’s beyond my skills. Your suggestions have been very useful. I will continue to explore and I would appreciate let me know if you have any additional ideas.

Best regards

Have you thought about integrating the vote into the registration form for Sitelok?

You could then omit the vote question from the update profile form.

It all depends on the structure of your Sitelok implementation. It is one of those questions that has many possible answers, but with a little planning, you should be able to make a robust and “scam proof” implementation. The beauty of Sitelok is that it is so flexible. Groups make this flexibility possible.

Good luck! Would be interested to hear what you decide.


As Mark said It could be that using a Sitelok form maybe the easiest way to have the user also added to the usergroup. It sounds like the users are already registered in Sitelok so an update profile form could be used to get the vote, store it in a custom field and remove the user to or from a usergroup if needed. You mentioned that you want the user to vote only once and there are a few ways to do that I think (for example using the Creditds Plugin). However in your case If the user is removed from a usergroup when they vote you can secure the form page using that same usergroup. Once they submit the form they get removed from the usergroup so can’t then access the form again. Would that work?

Thanks Mark for your ideas and replies.

Many thanks to Mark and Adrian for taking your time and providing ideas.
I will continue to try and will surely ask again. If any other member would like to give their opinion I will be very grateful.