registered user vs url method

4 views
Skip to first unread message

Angel Utset

unread,
May 3, 2013, 2:52:30 AM5/3/13
to manchester-word...@googlegroups.com

Hi

 

I am making a survey in the framework of an environmental project. I have designed a page template. However, the survey is in an “invitation” basis, not open to everybody.

I have thought in several solutions. I would greatly appreciate to receive your comments back.

1. Marking the page as “private”, accessible only for registered users.

2. Inserting the WordPress login at the beginning of the page template, showing the form only if users have been logged.

3. Sending an email to each of the invited contributors, with an URL link containing a specific variable. The template can check for matches, showing the form only if the variable contained in the URL is valid.

 

Actually, I would like to follow the 3rd option. I could design a plugin aimed to send emails to each of the contributors, containing links to access the form. Each URL can have a different variable, according to the contributor, conveniently wrapped in a WordPress nonce. I will only need an array of the “valid” variables, to be checked before showing the form.

I never have done this before, but I like the idea. The people involved in the survey won’t be users of the website, just allowed to access the survey.

 

I guess it has been done already, the WordPress email for validating new users must do something similar, I presume.

 

Any comment?

 

Cheers

 

Angel

 

Mike Little

unread,
May 7, 2013, 5:53:20 AM5/7/13
to Manchester WordPress User Group (MWUG)
On 3 May 2013 07:52, Angel Utset <angel...@gmail.com> wrote:

Hi

 

I am making a survey in the framework of an environmental project. I have designed a page template. However, the survey is in an “invitation” basis, not open to everybody.

I have thought in several solutions. I would greatly appreciate to receive your comments back.

[SNIP] 

3. Sending an email to each of the invited contributors, with an URL link containing a specific variable. The template can check for matches, showing the form only if the variable contained in the URL is valid. 

Actually, I would like to follow the 3rd option. I could design a plugin aimed to send emails to each of the contributors, containing links to access the form. Each URL can have a different variable, according to the contributor, conveniently wrapped in a WordPress nonce. I will only need an array of the “valid” variables, to be checked before showing the form.

I never have done this before, but I like the idea. The people involved in the survey won’t be users of the website, just allowed to access the survey.

 

I guess it has been done already, the WordPress email for validating new users must do something similar, I presume.

 

Any comment?

 


The WordPress email for validating signups, only applies to Multisite WordPress and uses information stored in the wp_signups table. 

But you could do something similar as you suggest: store a unique key and an email address for each user, probably in wp_options. 
Your URL should probably be something like http://example.com/signup/abcd1234 where abcd1234 is the unique code.
Only display the form if there is a valid code. And when they submit the form, check the email address and mark the code as used.
Don't use a nonce in the url as they only have a 14/24 hour validity, and you cannot know how long they will take to repsond. Use a nonce once the form is presented by all means.

If you don't want to do it as a plugin, simply create a template in your theme to do the processing, and assign that template to a page with the slug 'signup'.


Mike
--
Mike Little
WordPress Specialist

Skype: mike.little.zed1
Twitter: @mikelittlezed1

Founder and Director
Zed1.com Limited
http://zed1.com/
Registered in England & Wales, no. 6745562

Angel Utset

unread,
May 9, 2013, 1:58:42 AM5/9/13
to manchester-word...@googlegroups.com

Thanks Mike!

Actually, it is a multisite web. Is it any advantage?

I understand about none validity, thanks

I thought about a plugin because I need to send the “invitation” emails as well. I guess a plugin might be better to “manage” such emails and to create custom tables comprising the people invited to the survey and their answers (to be done from the template page containing the form). I might do another template to show the results, using Google graphics APIs.

 

 Thanks again!

 

Angel

 


--
See the group blog at http://mwug.info
 
You received this message because you are subscribed to the Google
Groups "Manchester WordPress User Group" group.
To post to this group, send email to
manchester-word...@googlegroups.com
To unsubscribe from this group, send email to
manchester-wordpress-...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/manchester-wordpress-user-group
---
You received this message because you are subscribed to the Google Groups "Manchester WordPress User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manchester-wordpress-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mike Little

unread,
May 9, 2013, 5:30:05 AM5/9/13
to Manchester WordPress User Group (MWUG)
On 9 May 2013 06:58, Angel Utset <angel...@gmail.com> wrote:

Thanks Mike!

Actually, it is a multisite web. Is it any advantage?

I understand about none validity, thanks

I thought about a plugin because I need to send the “invitation” emails as well. I guess a plugin might be better to “manage” such emails and to create custom tables comprising the people invited to the survey and their answers (to be done from the template page containing the form). I might do another template to show the results, using Google graphics APIs.

 

 Thanks again!

 

Angel



I wouldn't use the multisite registrations table no, but you could borrow that idea.

If you are doing that much with the survey, you should look at one of the off the shelf survey plugins or even survey services like Polldaddy which you can embed on a WordPress page or post. Then you just need to control access to the survey page using methods we've already discussed.

Writing your own survey plugin seems like too much work when there are already many good solutions out there either free or relatively cheap.

Mike
Reply all
Reply to author
Forward
0 new messages