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 8 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 8 months ago #58807

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9555
  • Thank you received: 1373
  • Karma: 389
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 development are on my free time (Need support ?).
A bug not reported is a bug not corrected. | 2.61lts version improved | Need plugins for LimeSurvey ?
The administrator has disabled public write access.

automatically generate tokens / immediately automatically email invitations? 5 years 8 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 8 months ago #58816

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9555
  • Thank you received: 1373
  • Karma: 389
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 development are on my free time (Need support ?).
A bug not reported is a bug not corrected. | 2.61lts version improved | Need plugins for LimeSurvey ?
Last Edit: 5 years 8 months ago by DenisChenu. Reason: valid email
The administrator has disabled public write access.

automatically generate tokens / immediately automatically email invitations? 5 years 8 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.
Time to create page: 0.273 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form