View Issue Details

IDProjectCategoryView StatusLast Update
0010628mantisbtemailpublic2010-09-19 03:11
Reporterklugmantisadmin Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0rc1 
Summary0010628: Lost Password feature does not send eMail
Description

when I click on "Lost your password?" on the Login-Page then I can enter
my username and eMail address. When I click on submit, then now password reset mail is sent to the user.

Steps To Reproduce

Click "Lost your password?" on login-page
enter Username and eMail address
click "Submit"

Additional Information

when I login as administrator and go to: "Manage" -> "Manage Users" and click on
the username and click "Reset Password" then Mantis sends a reset eMail.

my (partially anonymized) config_inc.php

<?php
$g_hostname = 'xyz';
$g_db_type = 'pgsql';
$g_database_name = 'mantis';
$g_db_username = 'xyz';
$g_db_password = 'abc';
$g_administrator_email = 'mantis-admin@domain';
$g_webmaster_email = 'mantis-admin@domain';
$g_from_email = 'mantis-admin@domain';
$g_return_path_email = 'mantis-admin@domain';
$g_send_reset_password = ON;
$g_max_lost_password_in_progress_count = 3;
$g_lost_password_feature = ON;
?>

TagsNo tags attached.

Relationships

duplicate of 0011394 closeddhx Lost password not working, no message output, no mail 

Activities

hoile

hoile

2009-07-08 05:57

reporter   ~0022441

The problem cannot reproduce, please give more information.
I follow the steps for reproduce provided by you and the email send to user successfull. Pleas check configuration for sending email in your php.ini file (smtp value)

hoile

hoile

2009-07-08 06:01

reporter   ~0022442

Also make sure your email server do not prevent by firewall/antivirus application

klugmantisadmin

klugmantisadmin

2009-07-08 07:38

reporter   ~0022443

When I sign up for a new account, then mantis sends an eMail.
I click the link in the "Account Registration" Mail and finish registration by setting a password.

I logged in with this new created account: works.
After logout I try the "Lost your password" link, enter username and eMail address and click submit.
And then I get back to the login page. No error message.
And still no eMail.

Due to the facts that

  • the "Account Registration" eMail works and
  • the "Reset Password" button in "Manage"->"Manage Users"-> sends an eMail too
    I think that this is not a problem caused by mis-configuration or firewall/antivirus.
hoile

hoile

2009-07-08 23:01

reporter   ~0022455

I had follow your instruction step by step:

  • create new account
  • open email client, click in the link to open profile page, set the new password
  • login with the new account
  • logout
  • click on link [Lost your password? ]
  • enter username and email --> click OK
    And the screen I got is:

             Password Message Sent

If you supplied the correct username and e-mail address for your account, we will now have sent a confirmation message to that e-mail address. Once the message has been received, follow the instructions provided to change the password on your account.

I have a check email client already, an email has sent to that user with url to reset password.
I think the system work right in my case, I'm using the latest code from svn (1.2.0rc1 )

klugmantisadmin

klugmantisadmin

2009-07-09 02:37

reporter   ~0022457

Maybe it's already fixed in svn-version.
I am using 1.2.0rc1 from http://sourceforge.net/projects/mantisbt/files/
(released on June 23rd)

How can I get the current version from svn?

hoile

hoile

2009-07-09 02:46

reporter   ~0022458

using svn client (ex: TortoiseSVN) to get the latest code at: https://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk/mantisbt

klugmantisadmin

klugmantisadmin

2009-07-09 05:06

reporter   ~0022459

now I tried the version from svn. I checked it out with the following command:
"svn checkout https://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk/mantisbt"
(hope this was correct)

But with this version I only get a error message when signup for a new account.
After click [Signup for a new account], entering username, email and captcha and click submit I get the following error message:

Database query failed. Error received from database was #-1: ERROR: column "enabled" is of type boolean but expression is of type integer at character 103
HINT: You will need to rewrite or cast the expression. for the query: INSERT INTO mantis_user_table
( username, email, password, date_created, last_visit,
enabled, access_level, login_count, cookie_string, realname )
VALUES
( 'user', 'user@domain', '9f47b8273f525c35c0b7e57117d16423', '2009-07-09 10:58:53', '2009-07-09 10:58:53',
1, 25, 0, 'aa19e5fe7fece627d0ad51f2b51ae23c4f492f36203f3c219bda6d2a7828eb64', '').

This already worked in that version that is available under
http://sourceforge.net/projects/mantisbt/files/
(released on June 23rd)

dhx

dhx

2009-07-09 08:09

reporter   ~0022461

We don't use SVN anymore so the version you checked out is actually from a million decades ago.

You'll want to check our git repository at http://git.mantisbt.org instead. The "master" branch is development work towards a 1.3.0 release and the "master-1.2.x" release is the next stable version that we're also working on.

klugmantisadmin

klugmantisadmin

2009-07-09 08:30

reporter   ~0022463

ok. nice to know :-)
now I know why it said something like: "database is newer than software. update software, please"

sorry for my lack of knowledge.
How can I get the current "master-1.2.x" release via git...

dhx

dhx

2009-07-09 08:37

reporter   ~0022464

http://git.mantisbt.org/?p=mantisbt.git;a=snapshot;h=master-1.2.x;sf=tgz

klugmantisadmin

klugmantisadmin

2009-07-09 09:21

reporter   ~0022465

ok. Now I installed this version.
But still I don't get an eMail.

When I enter a username that exists in Mantis with the wrong eMail address then I get this error message: The provided information does not match any registered account!

When I enter a username that does not exist in Mantis with a eMail address that is registered in Mantis than I get the same error message.

But when I enter a username with his correct eMail address then I don't get any
message. I just see the login page again.
With this URL in address bar: http://mantis/mantis_svn/login_page.php?return=%2Fmantis_svn%2Flost_pwd.php

Is there a possibility to enable mantis to output more information?
Like -v or --verbose :-)
I've seen a few debug-Variables in config_defaults_inc.php but have no idea which to enable to find out where my problem is...

DominionSpy

DominionSpy

2009-08-04 04:38

reporter   ~0022654

I'm seeing this same problem in version 1.2.0rc1.

All other emails work but when a user enters the correct information for their account on the lost password page, it goes straight back to the login page and no email is sent.

fjv

fjv

2009-08-06 07:59

reporter   ~0022672

I also see this (1.2.0rc1).

Tracked the execution thread as far as function user_pref_get() in user_pref_api.php. Where it dies within these lines:
474:

Check each variable in the class

foreach( $t_vars as $var => $val ) {
    # If we got a field from the DB with the same name
    if( in_array( $var, $t_row_keys, true ) ) {
        # Store that value in the object
        $t_prefs->$var = $row[$var];
    }
}

482:

dhx

dhx

2009-08-06 23:40

reporter   ~0022683

Have you configured php.ini (PHP) and config_inc.php (MantisBT) with the correct MTA (mail transfer agent) settings? If you're using the inbuilt PHP mail() function then email will be sent using the MTA defined in php.ini (probably using sendmail). On some systems where the traditional sendmail is replaced with an alternative (such as postfix, ssmtp, etc) you'd also have to configure those packages to send email correctly.

fjv

fjv

2009-08-07 03:27

reporter   ~0022691

Other mantis emails are sent ok - issue notifications and admin resetting other users passwords.

config_inc.php uses the default setting (which is mail() === /usr/sbin/sendmail)
Other php applications also send emails ok.

When the execution dies in the above few lines of code the email sending code does not get called. A diagnostic inserted at line 474 does make output, a diag inserted at line 482 does not. Could be visibility of attributes in t_prefs - will check again later.

fjv

fjv

2009-08-08 04:24

reporter   ~0022700

After tracking it 1 line further find the error occurs in the call to auth_get_current_user_id(). No current user -> no cookie -> sql ends up without a parameter.

There is a todo note near the query code see authentication_api.php in function auth_get_current_user_id()
line 772: /* @todo error with an error saying they aren't logged in? Or redirect to the login page maybe? /

looking further, found issue# 0007387: 'Lost Password' needs user cookie

watergad

watergad

2009-10-07 13:17

reporter   ~0023094

I'm not sure I have the same problem but:

Lost password emailing doesn't work (1.2.0rc1).
It goes through lost_pwd_page -> lost_pwd -> email_api.
Here it goes till lang_push( user_pref_get_language( $p_user_id ) );. After that we receive logon page and no any errors/confirmations.

Comment this line and all works fine now.

klugmantisadmin

klugmantisadmin

2009-10-08 05:08

reporter   ~0023098

Last edited: 2009-10-08 05:15

I updated to 1.2.0rc2.

Problem still exists.

watergad

watergad

2009-10-08 05:28

reporter   ~0023099

klugmantisadmin: you may comment line 472 in core/email_api.php
// lang_push( user_pref_get_language( $p_user_id ) );
No good but will work till the fix.

klugmantisadmin

klugmantisadmin

2010-03-01 11:00

reporter   ~0024580

Maybe it's the same problem as in 11394.
Maybe somebody could mark it as duplicate

loginaccess

loginaccess

2010-04-06 11:59

reporter   ~0025041

Last edited: 2010-04-06 12:03

I got this problem in version 1.2.0, just got the package from the download page.

rakekniven

rakekniven

2010-04-14 09:33

reporter   ~0025122

Last edited: 2010-04-14 09:36

I use 1.2.0 and problem still exists!
Could somebody please reopen this issue?

Best regards.

EDIT:
Problem still exists.
Made a fresh install.

Notifications work. Email is also send when Administrator resets account. So MTA configuration should be fine.

DominionSpy

DominionSpy

2010-04-14 09:44

reporter   ~0025123

@rakekniven

Have a look at my note in the duplicate issue (0011394:0024768) and see if this fixes your problem.

rakekniven

rakekniven

2010-04-14 09:54

reporter   ~0025124

I tried the tip from @watergad
you may comment line 472 in core/email_api.php
// lang_push( user_pref_get_language( $p_user_id ) );

That works for me

rakekniven

rakekniven

2010-04-15 05:54

reporter   ~0025127

@DominionSpy

I tried your solution right now and it works!
Will your fix be included in next release?

Gruß