how to trigger aRegistersErrors

More
4 months 1 day ago - 4 months 1 day ago #199913 by jnhghy
I'm adding a password field to the registrer page, I've added the field in the template and I can read the password entered by the user using:
Yii::app()->request->getPost( 'survey_password' );
I'm guessing I can do this in beforeRegister function of my custom plugin
what I can't understand is how do I trigger an error to the register form when the password entered is wrong?
I've tried adding:
$this->aRegisterErrors[] = gT("You must enter the valid survey password. Please try again.");
But this doesn't work for me.
I'm guessing the question is how do I trigger an error and return to the registration form if the password the user adds is wrong?

using LimeSurvey
Version 4.2.3+200511

Thank you.
Last edit: 4 months 1 day ago by jnhghy.

Please Log in to join the conversation.

More
4 months 1 day ago #199917 by jnhghy
I had a typo in my code:
aRegistersErrors should have been aRegisterErrors :(

Please Log in to join the conversation.

More
4 months 1 day ago #199931 by DenisChenu
Then it's OK now ?

Else : show all the code …

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now