SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    May 2007
    Location
    Kent in Uk
    Posts
    538
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    forgotten passwords help needed

    HI

    i have recently been following a tutorial for creating a php script for "forgotten passwords" where a random word is created from a dictionary on the local computer. As I am working from a windows platform I needed to download the dictionary to the computer.
    However when I tried to expand ISPELL 3.20.(the dictionary)1t allowed me to expand the overall files but would not allow me to expand the british.2 file (where all the words are.) I am just wondering if this is a problem others have faced. Reading various problems on google there appears to be a problem around opening file extension .2 files but I cant get to the bottom of how to solve it.
    Or does anyone know of any other way of downloading a dictionary to the computer?
    Or conversly another way of dealing with forgotten passwords?
    thanks

  2. #2
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How are you going to be using the dictionary for your problem?

    Basic method to deal with lost passwords:
    - Send email to user's account with unique link
    - At that page, reset their password and email them what the new password is.
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  3. #3
    SitePoint Addict skunkbad's Avatar
    Join Date
    Apr 2008
    Location
    Temecula, CA
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have users submit their email address associated with their account. A link is then emailed to them. This link has their encrypted username and encrypted password in the query string, and upon clicking it, the query string variables are checked against the database to find a matching user. This user is then allowed to change their password, which they must enter twice to confirm.

    Once this is done, the link in their email will never work again, unless they change their password to the same password they had in the first place. This sort of guarantees that the link won't be clicked on by somebody hacking their email box later.

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2009
    Location
    Athens, Greece
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What has to do the dictionary with the forgotten password? A dictionary is not needed, you read a bad tutorial

    The solution that triexa suggests is good.

    You can use a function to generate a random pass.

    Example

    PHP Code:
    function stringRandom($length)
    {
        
    $s 'ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz0123456789';
        
        return 
    mb_substr(str_shuffle($s), 0$length);
    }

    $random_pass stringRandom(10); 
    $random_pass will contain a random password with 10 characters.

    So easy


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
  •