SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Password Aging

  1. #1
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Password Aging

    Has anybody ever implemented password aging using PHP and MYSQL? If you have been successful with this process, please share it with us. Thanks in Advance.

  2. #2
    SitePoint Addict lmasi02's Avatar
    Join Date
    Aug 2004
    Location
    Zambia
    Posts
    257
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey,
    you can have a date in the mysql db. eg last_change which keeps track of the changes in the passwd. each time a user logs in, you check the differnce between the current dat and the last_change date.
    PHP Code:
    <?php
    $today
    =time();
    $num = ($today-$row['last_change'])/86400;
    if(
    $num>21)
    #redirect to a change passwd page
    else
    #proceed
    hope this help
    Power of Knowledge


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •