Menu

Request for new password

Help
potain
2009-09-15
2013-05-30
  • potain

    potain - 2009-09-15

    Hi Guys, it's me again.

    Got a message from a user:

    "I tried to change my password and followed the instructions from an email sent to me.  However I ended up with a password that I was given. Would you please let me know what went wrong and how to have a password of my own."

    Had to create a new user and go through the steps of requesting a new password to find out what the email sent said as I wasn't aware that for one a new password had been requested and the other of  the text contained in the email. .

    This is another compelling reason to add a Bcc field to the emails sent out as I suggested a while back (see Feature Request  ID: 2844181).


    Is html and multipart commented out in function_mail.php on purpose:

    $mailFormat = "plain";
    //$mailFormat = "html";
    //$mailFormat = "multipart";


    class.phpmailer.php has the functions:
    /**
    * Adds a "Bcc" address. Note: this function works
    * with the SMTP mailer on win32, not with the "mail"
    * mailer.
    * @param string $address
    * @param string $name
    * @return void
    */
    public function AddBCC($address, $name = '') {
    $cur = count($this->bcc);
    $this->bcc = trim($address);
    $this->bcc = $name;
    }

    How can I add the Bcc as variables to this code in functions_mail.php, if I need to:

    }
    $mail_object->Host = $PGV_SMTP_HOST;
    $mail_object->Port = $PGV_SMTP_PORT;
    $mail_object->Hostname = $PGV_SMTP_HELO;
    $mail_object->From = $from;
    if (!empty($PGV_SMTP_FROM_NAME) && $from!=$PGV_SMTP_AUTH_USER) {
    $mail_object->FromName = $PGV_SMTP_FROM_NAME;
    $mail_object->AddAddress($to);
    }

    so that I can add

    $message=$WEBMASTER_EMAIL;
    $message=$user_email;
    message = potain@ifrance,com;

    to login_register.php.

    Thanks

    Jean

     
  • Gerry Kroll

    Gerry Kroll - 2009-09-16

    Jean:
    Either the French text in the reply to the "Request new password" is wrong, or the user did not understand the instructions.

    The instructions assume that you have configured your site so that users can edit their own account details.  If they can't do so, you, as the admin, have to set the new password for the user.

    The procedure for password changes is this:

    1. The user clicks the "request new
        password" link on the Login page or
        in the Login block.
    2. PGV generates a random password and sends an e-mail
        to the user with that random password.
    3. As instructed in the e-mail, the user logs in and changes
        the password by editing his own account details.  The link to
        account editing is in the top menu of each page.

    If the French instructions are unclear or wrong, please provide the corrected text for inclusion in SVN.

     
  • potain

    potain - 2009-09-16

    In /includes/functions/functions_mail.php I added $bcc to to function pgvMail:


    function pgvMail($to, $from, $subject, $message, $bcc):

    and

    $extraHeaders = "From: $from\nContent-type: $mailFormatText;";

    $extraHeaders .= "Bcc: $bcc\nContent-type: $mailFormatText;";

    In login_register.php:

    $message=$WEBMASTER_EMAIL; to $message = array();

    I get these errors when registering new user:

    ERROR 2: Missing argument 5 for pgvMail(), called in /home/----/public_html/login_register.php on line 433 and defined
    0 Error occurred on line 38 of file functions_mail.php in function pgvMail
    1 called from line 433 of file login_register.php

    Warning: Missing argument 5 for pgvMail(), called in /home/----/public_html/login_register.php on line 433 and defined in /home/---/public_html/includes/functions/functions_mail.php on line 38

    ERROR 8: Undefined variable: bcc
    0 Error occurred on line 65 of file functions_mail.php in function pgvMail
    1 called from line 433 of file login_register.php

    ERROR 2: Missing argument 5 for pgvMail(), called in /home/----/public_html/includes/authentication.php on line 584 and defined
    0 Error occurred on line 38 of file functions_mail.php in function pgvMail
    1 called from line 584 of file authentication.php in function addMessage
    2 called from line 464 of file login_register.php

    Warning: Missing argument 5 for pgvMail(), called in /home/-----/public_html/includes/authentication.php on line 584 and defined in /home/---/public_html/includes/functions/functions_mail.php on line 38

    ERROR 8: Undefined variable: bcc
    0 Error occurred on line 65 of file functions_mail.php in function pgvMail
    1 called from line 584 of file authentication.php in function addMessage
    2 called from line 464 of file login_register.php

    Would appreciate your help as I am missing a declaration in (Error 2 missing argument 5 for pgvMail):

    require_once('includes/functions/functions_mail.php');

    pgvMail($user_email, $PHPGEDVIEW_EMAIL, str_replace("#SERVER_NAME#", $serverURL, $pgv_lang), $mail_body);

    Also not sure what to do in authentication.php. line 584 - do I need to add $bcc

    if (get_user_setting($message, 'email'))

    pgvMail($to, $from, $subject1, $email1);

    Thank you

    Jean

    - BTW the registration email is still being delivered OK to the new user's email.

     
  • potain

    potain - 2009-09-16

    Hi Gerry

    <The procedure for password changes is this:>

    Thank you very much.

    Yes,  I discovered the procedure after creating the new user and requesting a new password. I've asked her to forward me the email she received just to make sure that the instructions to access her My account  was there. She probably as you say did not read it properly. My site default is English.

    Can you help at all with the Bcc email request?

    Jean

     
  • potain

    potain - 2009-09-18

    Re - Request for new password

    Hi

    My user's confusion seem to be well founded as she followed my instructions to change her password from her Account page and subsequently was not able to log in with the changed  password.

    I also tried it  on a test Edit login ( username/password guestedit - changed password to gueastedit1) and got the same result:

    Unable to authenticate user.

    Even tried to change it through Admin but got the same result. Here is log record, Sorry about the length of it but wanted to give you the full picture.

    I also don't know why it's referring to Anonymous user instead of the proper user name:

    Content of log file

    18.09.2009 03:38:40 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:38:27 admin - User ->guestedit<- had password changed

    18.09.2009 03:38:03 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:12:51 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:11:31 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:11:16 admin - User ->guestedit<- had password changed

    18.09.2009 03:08:52 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:08:34 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:08:25 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:08:10 admin - User ->guestedit<- had password changed

    18.09.2009 03:06:09 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:06:01 Anonymous - Login Failed ->guestedit<-

    18.09.2009 03:05:49 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:05:40 Anonymous - Login Failed ->guestedit1<-

    18.09.2009 03:05:20 guestedit - Logout guestedit

    18.09.2009 03:05:06 guestedit - User changed password

    18.09.2009 03:04:26 guestedit - Login Successful

    18.09.2009 03:04:15 myuser - Logout myuser

    18.09.2009 02:35:47 myuser - Login Successful

    18.09.2009 02:29:24 myuser - Logout myuser

    18.09.2009 02:22:43 admin - Login Successful

    18.09.2009 02:12:28 myuser - Login Successful

    myuser  requested new password - I logged as myuser  to check that password sent was working and it was with the new password sent - not attempted to change password again

    17.09.2009 23:30:49 Anonymous - Login Failed ->myuser <-

    17.09.2009 23:30:16 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:27:04 Anonymous - Password request was sent to user: myuser

    17.09.2009 23:26:12 Anonymous - Login Failed ->myuser <-

    17.09.2009 23:25:50 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:24:21 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:22:08 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:19:25 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:18:40 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:17:25 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:14:50 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:14:22 Anonymous - Login Failed ->myuser<-

    17.09.2009 23:13:51 myuser Logout myuser

    17.09.2009 23:13:18 myuser User changed password

    17.09.2009 23:11:37 myuser - Logout  myuser

    17.09.2009 23:11:14 myuser - Login myuser

    17.09.2009 23:09:54 myuser - Logout  myuser

    17.09.2009 23:07:57 myuser - Login Successful

     
  • potain

    potain - 2009-09-18

    ## Follow on ##

    I wonder if it's this code in login_register .php under case "requestpw" : that's could be causing the problem:

    set_user_password($user_name, crypt($user_new_pw));

    set_user_setting($user_name, 'pwrequested', 1);

    Should the the second line read $username and not $user_name?

    Jean

     
  • Gerry Kroll

    Gerry Kroll - 2009-09-18

    Jean:
    The problem was already identified in the SVN version of PGV.  You need to change the first of the two lines.

    "$username" should be "$user_name".

     
  • potain

    potain - 2009-09-18

    Many thanks Gerry

    I'll give that a go  & sorry about the length of the post again.

    Jean

     
  • charlie hazlett

    charlie hazlett - 2009-12-31

    I tried a new password link and it would not even send me the email.  What do I do ????

     
  • Anonymous

    Anonymous - 2009-12-31

    hazlett

    What version of PGV?

    What are your mail settings in config?

     
  • charlie hazlett

    charlie hazlett - 2009-12-31

    Version 4.2

    Mail in config.php is:

    $PGV_SMTP_ACTIVE=false; //- Enable to use of SMTP to send external emails
    $PGV_SMTP_HOST=''; //- The domain name of the SMTP smarthost
    $PGV_SMTP_HELO=''; //- The local SMTP domain name
    $PGV_SMTP_PORT='25'; //- The port number talk to the SMTP smarthost
    $PGV_SMTP_AUTH=false; //- Enable the use of SMTP authorization
    $PGV_SMTP_AUTH_USER=''; //- User name for SMTP authorization
    $PGV_SMTP_AUTH_PASS=''; //- Password for SMTP authorization
    $PGV_SMTP_SSL=false; //- Use SSL for SMTP authorization
    $PGV_SMTP_FROM_NAME=''; //- Sender name

    I suppose I need to put some values in there…….
    ???

     
  • Stephen Arnold

    Stephen Arnold - 2009-12-31

    Charlie:  
    Yes, you need values. I would recommend you change your config.php to configured = false or even better simply replace it with a new version and start over on the configuration (save your old one as a sample of your previous entries).  Then you can reconfigure an admin access and your email setup.  
    -Stephen

     
  • charlie hazlett

    charlie hazlett - 2010-01-01

    Thanks, I will try the latest version and see what happens, I had considered reinstalling but the latest version should be better.

    Thanks…..

     

Log in to post a comment.