From 1951866c7d86cc6aeebca89a7022183a26879091 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 5 Feb 2010 14:03:29 -0700 Subject: [PATCH] Admin login provided by appInit() --- horde/bin/alarms | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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')); -- 2.11.0