From: Michael M Slusarz Date: Fri, 5 Feb 2010 21:03:29 +0000 (-0700) Subject: Admin login provided by appInit() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1951866c7d86cc6aeebca89a7022183a26879091;p=horde.git Admin login provided by appInit() --- diff --git a/horde/bin/alarms b/horde/bin/alarms index 9f839f1e2..10e1d97e4 100755 --- a/horde/bin/alarms +++ b/horde/bin/alarms @@ -10,14 +10,6 @@ */ require_once dirname(__FILE__) . '/../lib/Application.php'; -Horde_Registry::appInit('horde', array('authentication' => 'none', 'cli' => true)); +Horde_Registry::appInit('horde', array('authentication' => 'none', 'cli' => true, 'user_admin' => true)); -// Authenticate as administrator. -if (!count($conf['auth']['admins'])) { - exit("You must have at least one administrator configured to run the alarms.php script.\n"); -} -Horde_Auth::setAuth($conf['auth']['admins'][0], array()); - -// Run -$horde_alarm = Horde_Alarm::factory(); -$horde_alarm->notify(null, true, false, array('notify')); +Horde_Alarm::factory()->notify(null, true, false, array('notify'));