Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Login with username and password for users who are going to take survey

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #120956 by tpartner
You can create a remote file PHP with your form. Use the RemoteControl 2 API to create the token and then redirect to the survey URL including the token.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • garvsaxena
  • garvsaxena's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #120964 by garvsaxena
Thanks it really appreciated..!
I have one more question that I want to change the value attribute of buttons but can not figure out from where I can do this, and secondly I want to show the user's name who is doing the survey currently, for your knowledge I have activated the token based authentication, thats why we have the current user details in the database. Please help me out..!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #120966 by DenisChenu
For the User name, best is to add it in your survey.
Survey description, or maybe better : Group description.

You are {TOKEN:FIRSTNAME} {TOKEN:LASTNAME}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: garvsaxena
The topic has been locked.
  • garvsaxena
  • garvsaxena's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #120968 by garvsaxena
Thanks a lot it works, actually we have to edit a page which is attached along with this post, please have a look. This is a default login screen of lime survey when the survey is a controlled survey. We have to add one more field in this form. Can we achieve this or is there any limitations? If we can achieve this then from which file means which html file is responsible for this design. Please help me out..!
Attachments:
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #120969 by DenisChenu
Tony and me already say : you must do PHP script. Using Remote control OR plugin beforeSurveyPage event.

I don't make PHP support on LS free forum.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • garvsaxena
  • garvsaxena's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #120971 by garvsaxena
ya thats I know very well..But I just want to know the file name from which I can change the view or add some fields on this attached file. I dont want you to make or tell me any PHP changes.
Attachments:
The topic has been locked.
  • garvsaxena
  • garvsaxena's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #121032 by garvsaxena
Hey, First of all the new look of the forum is quite impressive, it looks good.
Actually I was trying to change the login functionality of the user to survey. Currently what happens is that user is asked to enter only token and if the token is matched with the one in database, the user allows to access the survey. But now we need to check token as well as email of the user as a username. But for this I am not be able to find the respective model file or controller file. Can anyone help me out...??
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #121045 by DenisChenu
Already said ... you have to do your own plugin. Do some test, hack code , look at code etc ....

Speed example:
Code:
$sToken= Yii::app()->request->getParam('token');
$sPassword=Yii::app()->request->getParam('tokenpassword');
if($iSurveyId && $sToken)
{
      $oToken=TokenDynamic::model($iSurveyId)->find('token=:token',array(':token'=> $sToken));
      if($sPassword==$oToken->attribute_1)
             return; // Do nothing, let LS continue
      else
       // Shown you own page with input name="tokenpassword" and input name="token"
}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • garvsaxena
  • garvsaxena's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #121108 by garvsaxena
Thanks for this code..!

But I want to check the users email at the time of token check. And store both the values in the session.
We want to add one more functionality to limesurvey, user who is logged in to participate in the survey can change his token value. Is there any code sample or code help on the limesurvey forum, I am asking this because I have already search the forum for this topic and found nothing.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 9 months ago #121109 by DenisChenu
Hi,

It's a free forum here ... If you start something, we can help : show your actual code, make some test etc ....

Else you can have professional support on www.limesurvey.com/customization

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #121450 by Mazi
Denis, is there any certain reason why your plugin won't work with LS 2.06 anymore? Did some plugin events change?

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose