Login     Sign up
How to Validate Signup Form
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Hello, currently users on my site are able to sign in without even entering a password for themselves as well as other information that they can skip. I was wondering if anyone knew how to make it so that I will be able to validate and ensure they entered a password during sign up?

Thanks

171 months ago
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

After looking around at the member.module.php file I figured it out.

171 months ago
kingmagi (@king10magi)
Join date: Sep 6th 2010
Community posts: 97
View Profile
Send Message

how men? can u share??

171 months ago
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

sure. go to your 'includes' folder then 'libs' then locate a file named 'member.module.php' Then find the signup function located for me around line number 298 and enter the following code or you can edit this to fit what you would like. For me I wanted the user to enter a password that has to be at least 7 or more characters.
[code]

if (strlen(!$_POST['password']) < 7){
$errors[] = t('For security purposes, Please enter a password that is 7 or more characters long');
}
[/code]

171 months ago
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Correction (! not needed) :
[code]
if (strlen( $_POST['password']) < 7){
$errors[] = t('For security purposes, Please enter a password that is 7 or more characters long');
}

[/code]

171 months ago
kingmagi (@king10magi)
Join date: Sep 6th 2010
Community posts: 97
View Profile
Send Message

oh..thank you..

171 months ago