Skip to main content
Topic: Can't use cron to check IMAP if "Allow guests to browse the forum" disabled (Read 1890 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Can't use cron to check IMAP if "Allow guests to browse the forum" disabled

Hi,

I'm trying to use cron to check IMAP for topic replies (through email_imap_cron.php). It works fine if "Allow guests to browse the forum" is enabled, but if I uncheck this box, the script diverts to the login page without checking the IMAP box.

Bug or am I doing something wrong?

Re: Can't use cron to check IMAP if "Allow guests to browse the forum" disabled

Reply #1

I just checked this on my local install, it still runs when guest browsing is disabled just less frequently due to the amount of times I can access it.

The cron task is run by people accessing the forum as a scheduled task.

You can set up a manual cron to run it every x mins rather than having to rely on people accessing the forum.

Re: Can't use cron to check IMAP if "Allow guests to browse the forum" disabled

Reply #2

I'd vote for the bug dammit.
Try changing in email_imap_cron.php, the line:
Code: [Select]
new Bootstrap();
to:
Code: [Select]
global $ssi_guest_access;
$ssi_guest_access = true;
new Bootstrap(true);
Bugs creator.
Features destroyer.
Template killer.

Re: Can't use cron to check IMAP if "Allow guests to browse the forum" disabled

Reply #3

Thanks, that seems to work.

Re: Can't use cron to check IMAP if "Allow guests to browse the forum" disabled

Reply #4

Tracked: https://github.com/elkarte/Elkarte/issues/3195
Bugs creator.
Features destroyer.
Template killer.