Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: automatically generate tokens / immediately automatically email invitations?

automatically generate tokens / immediately automatically email invitations? 5 years 5 months ago #58804

  • Surveyer
  • Surveyer's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
When using tokens, is it possible to let someone enter a referral code and have it automatically generate their token, and then either:

* redirect them to immediately take the survey, or
* immediately and automatically email them their invitation?
The administrator has disabled public write access.

automatically generate tokens / immediately automatically email invitations? 5 years 4 months ago #58807

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9298
  • Thank you received: 1330
  • Karma: 386
Hello,

You can do your own php script to fill the token database.
Token database aren't so complicated.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

automatically generate tokens / immediately automatically email invitations? 5 years 4 months ago #58814

  • Surveyer
  • Surveyer's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Yes, and any advice for after the token database is filled on how to:

* redirect them to immediately take the survey (preferred), or
* immediately and automatically email them their invitation?

Thank you!
The administrator has disabled public write access.

automatically generate tokens / immediately automatically email invitations? 5 years 4 months ago #58816

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9298
  • Thank you received: 1330
  • Karma: 386
I think the best is to use a redirect php function .

The idea:

- generate a unique token id $genToken
- insert the token in the database lime_token_$sidSurvey

and after:
header("Location: ".$yourURL."index.php?sid=".$sidSurvey."&token=".$genToken."&newtest=Y");

With this : you don't have to have a valid email for the surveyor :)
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
Last Edit: 5 years 4 months ago by DenisChenu. Reason: valid email
The administrator has disabled public write access.

automatically generate tokens / immediately automatically email invitations? 5 years 4 months ago #58867

  • Surveyer
  • Surveyer's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Excellent. Thank you Shnoulle! I'll try that approach. Thanks again!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.270 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form