Page 1 of 1
required user registration fields are not required
Posted:
December 25th, 2011, 1:19 am
by mhume
I added a couple registration fields called address, school name, etc. I have latest versions of wordpress 3.3 and s2member 111220. I made these user fields required in the admin ui as single line text fields. But, when practicing the registration process, only the default wordpress email and username were required to register. I was coding on wamp and already added the define("LOCALHOST", true); in the config file.
Thanks,
Matt
Re: required user registration fields are not required
Posted:
December 25th, 2011, 10:48 pm
by Raam Dev
Hey Matt,
Did you make sure that you were fully logged out when testing the registration process?
Re: required user registration fields are not required
Posted:
December 27th, 2011, 12:12 am
by stonecoldcnc
I can confirm that.
Same happens here, only user-name and email is required but NOT the first and last name. Although it does seem to be working correctly on the .../wp-login.php?action=register page but neither of the .../member-page/ or my login sliding panel are checking the first and last name.
My custom login/register pages used work before, when a user missed to fill in a required information it automatically redirected them to .../wp-login.php?action=register page. That is still happening but only if the username or email is missing, not for any of the other required fields.
I noticed about 2-3 weeks ago that I have members signing up without a last name. They were mostly spammers and I thought they found a way around all the security mechanisms but I only now realized that name fields are not required anymore to sign-up.
I tested this with the same results on the life and localhost site.
Re: required user registration fields are not required
Posted:
December 27th, 2011, 6:13 am
by Cristián Lávaque
How did you make the first and last names required? Could you show me a screenshot?
Re: required user registration fields are not required
Posted:
December 27th, 2011, 7:50 am
by stonecoldcnc
Hi Cristián
I'm loading the registration fields inside the registerform with this action:
- Code: Select all
<?php do_action('register_form'); ?>
Here is the complete code of the form:
- Code: Select all
<!-- Register Form -->
<form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
<h1>Not a member yet? Sign Up!</h1>
<label class="grey" for="user_login"><?php _e('Username*') ?></label>
<input class="field" type="text" name="user_login" id="user_login" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" />
<label class="grey" for="user_email"><?php _e('E-mail*') ?></label>
<input class="field" type="text" name="user_email" id="user_email" class="input" value="<?php echo attribute_escape(stripslashes($user_email)); ?>" size="25" tabindex="20" />
<?php do_action('register_form'); ?>
<label id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></label>
<input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Register'); ?>" class="bt_register" />
</form>
Everything works fine except that the required* fields are not required to register. Not sure if that is caused by any of the latest versions of wordpress 3.3 and s2member 111220 since I noticed the problem about 2-3 weeks ago.
Re: required user registration fields are not required
Posted:
December 27th, 2011, 9:02 am
by Eduan
Could you please try using the shortcode that's generated instead of the HTML?
You will benefit by the fact that the shortcode is encrypted and the HTML isn't.
Please tell me how it goes.
Thanks.
Re: required user registration fields are not required
Posted:
December 27th, 2011, 9:57 am
by stonecoldcnc
Hi Eduan/Cristián
s2member has 100s of shortcodes, I looked through the list but can't find anything to create a custom login/register form. Can you point me in the right direction please as I have no clue what you mean?
Re: required user registration fields are not required
Posted:
December 27th, 2011, 10:18 am
by mhume
Raam Dev wrote:Hey Matt,
Did you make sure that you were fully logged out when testing the registration process?
Thanks for the reply. Yes, I did completely log out and also tried registering in a couple different browsers. It did not require any fields except the email and username to register. I had no other modules at the time of testing this. Just the latest wordpress and s2member.
Re: required user registration fields are not required
Posted:
December 27th, 2011, 4:12 pm
by Raam Dev
Would it be possible to share the registration URL so I can attempt registering without the fields?
Re: required user registration fields are not required
Posted:
December 27th, 2011, 8:10 pm
by stonecoldcnc
here is the link:
http://stonecoldcnc.com/member-page/you can also register using the sliding panel at the top right hand corner on the same page.
Re: required user registration fields are not required
Posted:
December 27th, 2011, 8:33 pm
by mhume
My site is on my local computer on Wamp. Let me know if stonecoldcnc's link is sufficient for you. Otherwise I can try to post my site live.
Re: required user registration fields are not required
Posted:
December 27th, 2011, 8:44 pm
by mhume
Oh, the only link i was using was on the .../wp-login.php?action=register. sample screenshot attached of error after ommitting the email only. You can see the only error returned was for the email, even though a number of other fields have the asterick.
Re: required user registration fields are not required
Posted:
December 28th, 2011, 11:10 pm
by Raam Dev
I've confirmed this problem in my test installation. I'm escalating this to our lead developer and will update you when I have more information.
Thank you for your patience!
Re: required user registration fields are not required
Posted:
December 29th, 2011, 3:04 am
by Cristián Lávaque
stonecoldcnc wrote:Hi Cristián
I'm loading the registration fields inside the registerform with this action:
...
Everything works fine except that the required* fields are not required to register. Not sure if that is caused by any of the latest versions of wordpress 3.3 and s2member 111220 since I noticed the problem about 2-3 weeks ago.
I understand now what you meant.
s2Member checks for the first and last names with JavaScript, it's not server side if I'm not mistaken.
This form was created by you and you're not using the JS to check the fields, s2Member has nothing to do with it, so there's nothing requiring those fields.
Have you tried going to the default registration form and copying the HTML for the form from it? That may work and do s2Member's JS check.
/wp-login.php?action=registerstonecoldcnc wrote:s2member has 100s of shortcodes, I looked through the list but can't find anything to create a custom login/register form. Can you point me in the right direction please as I have no clue what you mean?
There is a pro-form in s2Member Pro, that lets you create a registration form with a shortcode.
WP Admin -> s2Member -> PayPal Pro-Forms -> Free RegistrationI hope that helps!
Re: required user registration fields are not required
Posted:
December 31st, 2011, 11:06 am
by stonecoldcnc
Hi Cristián
not sure if you have seen the post above yours from Raam Dev, he has confirmed the problem in his test installation.
regarding:
Have you tried going to the default registration form and copying the HTML for the form from it? That may work and do s2Member's JS check. /wp-login.php?action=register
As I said before I'm using
<?php do_action('register_form'); ?> to create the form which seems to be exactly the same html code as here /wp-login.php?action=register when I look through the html code.
Re: required user registration fields are not required
Posted:
December 31st, 2011, 11:48 am
by stonecoldcnc
I have just done a bit more testing and figured out that on the normal registration page
http://stonecoldcnc.com/wp-login.php?action=register the first name and last name
are required
but not the country code which supposed to be required too as you can see in the attached photos.
- s2member required registration fields for http://stonecoldcnc.com
- required country code for http://stonecoldcnc.com
- country code required.png (6.25 KiB) Viewed 4353 times
Hopefully you will find the bug soon as I have constantly people registering with missing details.
Re: required user registration fields are not required
Posted:
January 5th, 2012, 2:27 am
by Jason Caldwell
Hi there. Thanks for reporting this important issue.Can you please post your list of options for this Custom Registration/Profile Field?
I see that you have
(please select a country) as the default option. Does this have a value assigned to it somehow? Even if it's just a space, that's something, and could cause trouble for the validation routine. You should have something like this.
Re: required user registration fields are not required
Posted:
January 5th, 2012, 2:38 am
by Cristián Lávaque
Ah, I see. I went to look at the HTML of the form and that option reads:
- Code: Select all
<option value="" "" selected="selected">(please select a country)</option>
So that must be the issue.
Juergen, could you please clean up that default so it has not value at all?
- Code: Select all
<option value="" selected="selected">(please select a country)</option>
Thanks, Jason.
Re: required user registration fields are not required
Posted:
January 5th, 2012, 8:38 pm
by Raam Dev
stonecoldcnc,
s2Member's JavaScript routines for
/wp-login.php, will only run on
/wp-login.php, even if they are loaded into another page with the same element IDs, classes, etc.
The reason for this, is line #141 inside
/s2member/includes/s2member.js, which ultimately runs from
/s2member/includes/s2member-min.js.
You can manually change this inside
/s2member/includes/s2member.js, and then save it as
/s2member-min.js.
- Code: Select all
if (location.href.match (/\/wp-login\.php/))
{
That's the bit of code that forces the JavaScript to only run when loading from
wp-login.php.
Re: required user registration fields are not required
Posted:
January 6th, 2012, 3:16 pm
by mhume
I wanted to make sure that my issues may be related to stonecoldcncs, but not nessecarily. My additional fields were text fields. I had played around with different settings, such as requiring 3 characters minimum for the text fields. But, I never got anything to work. My last screenshot was on Dec 27.
Re: required user registration fields are not required
Posted:
January 6th, 2012, 8:29 pm
by stonecoldcnc
I was also hoping that our issues are related but perhaps they are of different nature and sorry for hijacking your threat.
Big thanks to Raam, Cristián and Jason, I did have 2 spaces and 2 quotes in front of the pipe and after removing them the field is recognized as required. Well spotted.
I'm still having the same issue that the custom fields are only required when I'm on the /wp-login.php page but not on my /member-page or not when people trying to register on my slide-down panel which is avaliable to them on any page. I have been tempering with what Raam suggested to change the
- Code: Select all
if (location.href.match (/\/wp-login\.php/))
but that is not working. Basically the custom fields are not getting checked on any other page but /wp-login.php even if I take the whole line out.
mhume - I did look at your screen shot again and now wondering why your error messages are listed above your register form. I only get the error shown there when I try to register from one of my custom forms on other pages but not when I'm on the original /wp-login.php page. When try to register on the /wp-login.php page with empty required fields I only get a pop-up window showing the errors as in the attached screen shot.
I think both our problems will be solved if s2member will check custom fields regardless on what page are they on.
Re: required user registration fields are not required
Posted:
January 7th, 2012, 7:31 pm
by Raam Dev
Juergen,
The free version of s2Member does not currently support registration forms on any page except wp-login.php?action=register. If you want to place registration forms on a different page, we recommend that you use Pro-Forms, a feature that comes with s2Member Pro.
The error messages listed above the registration form confirm that s2Member is checking the form (that JavaScript popup dialog is created by the s2Member JavaScript).