phpScheduleIt
May 19, 2013, 09:35:29 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Password change one time activity  (Read 518 times)
vipinmaster
Newbie
*

Karma: 0
Posts: 10


« on: December 07, 2011, 04:51:36 AM »

Hi Nick,

I want to do a one time password change activity.

I want that if a user log's in with the old password then the user should be redirected to the register edit page and then to cntrlpnl.php.

I need this only one time.

Please guide me how to do this.

Thanks

Vipin
Logged
vipinmaster
Newbie
*

Karma: 0
Posts: 10


« Reply #1 on: December 09, 2011, 12:05:10 AM »

Hi,

Guys i got a solution for this . Delete Passwords from the Database and ask the users to use forgot password link first. When the user uses the link he/she will get a email with a new password with the following criteria:-

for ($i = 0; $i < 10; $i++) {
        // Seed random for older versions of PHP
        mt_srand(make_seed());
        if ($i == 0)
         $num = mt_rand(65, 90);   // Lowercase letters
         if ($i == 1)
         $num = mt_rand(65, 90);   // Lowercase letters1
      else if ($i == 2)
         $num = mt_rand(48, 57);      // Numbers
      else if ($i == 3)
         $num = mt_rand(35, 38);      // Special Character
      else
         $num = mt_rand(97, 122);      // Uppercase letters
        // Put password together
        $pwd .= chr($num);
    }



Then the user can change the password from the change profile page after logging in.

Thanks Nick

Any queries feel free to ask.


Thanks

Vipin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!