6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/16/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#11518] Login Tasks
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..__ .__..___.. , |_/ | \[__] | \./ | \|__/| | | |
Comment
> I'd like this to be re-examined. I've just received feedback from a > user that has both DeleteSentmailMonthly and RenameSentmailMonthly > set active. It appears that the RenameSentMailMonthly is never called > if both are active. > > Horde does ask the user permission for both logintasks, but only > DeleteSentmailMonthly is called. I've debugged this further in > LoginTasks.php. The problem is in the runTasks-function and the way > it handles user confirmation. > > Logintasks are executed only if one of the following is true: > > if (($val instanceof Horde_LoginTasks_SystemTask) || > in_array($val->display, array(self::DISPLAY_AGREE, > self::DISPLAY_NOTICE, self::DISPLAY_NONE)) || > in_array($key, $opts['confirmed'])) > > First two aren't but the third one should be because the user has > confirmed the tasks. I've debugged $key and $opts['confirmed'] and > they contain the following if both tasks are active: > > $key: > 2013-04-09T13:02:22+00:00 DEBUG: Variable information: > int(0) > 2013-04-09T13:02:19+00:00 DEBUG: Variable information: > int(1) > > $opts['confirmed']: > 2013-04-09T13:02:22+00:00 DEBUG: Variable information: > array(2) { > [0]=> > string(20) "logintasks_confirm_0" > [1]=> > string(20) "logintasks_confirm_1" > } > > The non-strict checking with in_array(0, "logintasks_confirm_X") will > always evaluate to true because of this: > https://bugs.php.net/bug.php?id=14343&edit=1 > In other hand all the other tasks won't be executed because every > non-zero check with in_array will evaluate to false. > > The comparison between int and string seems to result in strange behaviour. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers