PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

required user registration fields are not required

s2Member Plugin. A Membership plugin for WordPress®.

required user registration fields are not required

Postby mhume » December 25th, 2011, 1:19 am

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
User avatar
mhume
Registered User
Registered User
 
Posts: 5
Joined: December 25, 2011

Re: required user registration fields are not required

Postby Raam Dev » December 25th, 2011, 10:48 pm

Hey Matt,

Did you make sure that you were fully logged out when testing the registration process?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: required user registration fields are not required

Postby stonecoldcnc » December 27th, 2011, 12:12 am

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.
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby Cristián Lávaque » December 27th, 2011, 6:13 am

How did you make the first and last names required? Could you show me a screenshot?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: required user registration fields are not required

Postby stonecoldcnc » December 27th, 2011, 7:50 am

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.
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby Eduan » December 27th, 2011, 9:02 am

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.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: required user registration fields are not required

Postby stonecoldcnc » December 27th, 2011, 9:57 am

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?
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby mhume » December 27th, 2011, 10:18 am

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.
User avatar
mhume
Registered User
Registered User
 
Posts: 5
Joined: December 25, 2011

Re: required user registration fields are not required

Postby Raam Dev » December 27th, 2011, 4:12 pm

Would it be possible to share the registration URL so I can attempt registering without the fields?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: required user registration fields are not required

Postby stonecoldcnc » December 27th, 2011, 8:10 pm

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.
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby mhume » December 27th, 2011, 8:33 pm

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.
User avatar
mhume
Registered User
Registered User
 
Posts: 5
Joined: December 25, 2011

Re: required user registration fields are not required

Postby mhume » December 27th, 2011, 8:44 pm

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.
Attachments
FireShot Screen Capture #015 - 'YEWTHS ROC › Registration Form' - localhost_yewths_wp-login_php_action=register.pdf
(56.61 KiB) Downloaded 31 times
User avatar
mhume
Registered User
Registered User
 
Posts: 5
Joined: December 25, 2011

Re: required user registration fields are not required

Postby Raam Dev » December 28th, 2011, 11:10 pm

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!
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: required user registration fields are not required

Postby Cristián Lávaque » December 29th, 2011, 3:04 am

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=register

stonecoldcnc 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 Registration

I hope that helps!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: required user registration fields are not required

Postby stonecoldcnc » December 31st, 2011, 11:06 am

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.
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby stonecoldcnc » December 31st, 2011, 11:48 am

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 fields.png
s2member required registration fields for http://stonecoldcnc.com


country code required.png
required country code for http://stonecoldcnc.com
country code required.png (6.25 KiB) Viewed 4370 times


Hopefully you will find the bug soon as I have constantly people registering with missing details.
 
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby Jason Caldwell » January 5th, 2012, 2:27 am

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.

SNAG-0002.png
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: required user registration fields are not required

Postby Cristián Lávaque » January 5th, 2012, 2:38 am

Ah, I see. I went to look at the HTML of the form and that option reads:

Code: Select all
<option value="&quot;  &quot;" 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. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: required user registration fields are not required

Postby Raam Dev » January 5th, 2012, 8:38 pm

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.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: required user registration fields are not required

Postby mhume » January 6th, 2012, 3:16 pm

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.
User avatar
mhume
Registered User
Registered User
 
Posts: 5
Joined: December 25, 2011

Re: required user registration fields are not required

Postby stonecoldcnc » January 6th, 2012, 8:29 pm

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.

 
Attachments
s2member-not-required-fields.png
Juergen
Perth Western Australia


Information about CNC machines for Stone Stonecoldcnc.com
and free sink and basin DXF template files.
User avatar
stonecoldcnc
Registered User
Registered User
 
Posts: 19
Joined: September 1, 2010

Re: required user registration fields are not required

Postby Raam Dev » January 7th, 2012, 7:31 pm

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).
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron