#!/usr/local/bin/php -f $authenticated = false; foreach ($authmodes as $authmode) { $authcfg = auth_get_authserver($authmode); if (!$authcfg && $authmode != "local") continue; $authenticated = authenticate_user($username, $password, $authcfg); if ($authenticated == true) break; } if ($authenticated == false) { syslog(LOG_WARNING, "user {$username} could not authenticate.\n"); exit(-1); } syslog(LOG_WARNING, "user {$username} authenticated\n"); exit(0); ?>