If the modules "Subscriptions" and "PoorMansCron" are used at the same time it can happen that you can't login to your site anymore. (It happened to me and it took me several hours to find out that the only way to gain access again, is to rename either the Subscriptions or the PoorMansCron module in the modules directory on the website).

Steps to reproduce:
* Install both the subscriptions and the poorman's cron module.
* Configure subscriptions to send emails as soon as possible
* Configure poor man's cron to work every "0" minutes
* Change some content and see if you get an email notification
* Log out
* Try to log in again. It will fail.

The reason for this behaviour can be found in subscriptions_mail.module, function "subscriptions_mail_cron()": There is one "session_save_session(FALSE)" too much -- or one session_save_session(TRUE) too less. My guess is that the session_save_session(FALSE) in line 16 is superfluous. I commented it out and at least I can log in again with both poormanscron and subscriptions activated. But I don't know yet if there are other side effects.

If you have a real cron process on your server it may not be a problem, because the function is running in another process. But with poor man's cron it runs in the user's process and session management is shut of for the user thereafter => he can't log in.

Comments

salvis’s picture

Thank you for the report and diagnosis. Yes, the session_save_session(FALSE) above the while shouldn't be there!

salvis’s picture

Version: 5.x-2.0-beta11 » 5.x-2.0-beta12
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.