1: <?php
2: /**
3: * Login task that filters INBOX on login.
4: *
5: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (GPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/gpl.
9: *
10: * @author Michael Slusarz <slusarz@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/gpl GPL
13: * @package IMP
14: */
15: class IMP_LoginTasks_Task_FilterOnLogin extends Horde_LoginTasks_Task
16: {
17: /**
18: * The interval at which to run the task.
19: *
20: * @var integer
21: */
22: public $interval = Horde_LoginTasks::EVERY;
23:
24: /**
25: * Display type.
26: *
27: * @var integer
28: */
29: public $display = Horde_LoginTasks::DISPLAY_NONE;
30:
31: /**
32: * Constructor.
33: */
34: public function __construct()
35: {
36: $this->active = $GLOBALS['prefs']->getValue('filter_on_login');
37: }
38:
39: /**
40: * Filter INBOX on login.
41: */
42: public function execute()
43: {
44: $GLOBALS['injector']->getInstance('IMP_Filter')->filter('INBOX');
45: }
46:
47: }
48: