Zubrag.com
October 19, 2018, 01:54:01 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Required Retype Password field to prevent user mistyping  (Read 16902 times)
dingi
Newbie
*
Posts: 5


« on: March 04, 2010, 08:35:51 PM »

I have installed Advanced Password Protect and it works fine without any problem. Since I don't know php, I am in need of help from this forum. Please tell me what code should be added to enable "ReType Password" and see if it matches with the 1st password field while the user signup the form. This will prevent the user from any typing error in the password field. Also better if change password option is added to enable users to update their password.

Logged
1ststop
Newbie
*
Posts: 30


« Reply #1 on: March 14, 2010, 09:37:49 AM »

There are several steps required to add the re-type password facility.

I'll need to write each step seperately because the forum will only allow 1000 characters for each post.
These instructions assume your script is unmodified so far.

Step 1  (In signup.php).

Find this on line 31 -- // remove suspicious characters
and add this ABOVE it -- $this->retypepass = $_REQUEST['retype_pass'];
(First line becomes line 32. New line is added in the 'parse_user_input' function section on line 31)
Logged
1ststop
Newbie
*
Posts: 30


« Reply #2 on: March 14, 2010, 09:38:53 AM »

Step 2  (Also in signup.php)

Now find the // password validation section between lines 53 and the //email validation section on line 63. At the end of the password validation section there is a } on line 61. Add the following BETWEEN the } and //email validation

// validate password
   if ($this->retypepass != $this->pass) {
      $this->error = "Second password does not match the first. Please retype";
      return false;
    }
Logged
1ststop
Newbie
*
Posts: 30


« Reply #3 on: March 14, 2010, 09:46:04 AM »

Now you need to add the input field in signup_form.php

Step 3

Find -- <?php if (USE_EMAIL && !LOGIN_AS_EMAIL) echo "<br />Email:<br /><input type='input' name='access_email' value='$this->email' />"; ?> on line 7


Add  --  <br />Re-type Password:<br /><input type="password" name="retype_pass" /> AFTER it.
(The above line 7 becomes line 8. New line is line 7.)
Logged
dingi
Newbie
*
Posts: 5


« Reply #4 on: March 18, 2010, 09:02:52 AM »

Thank you for your response and explaining me the method involved in retyping password feature. I will do it as you said and post the result. Thank you once again.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC