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