summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authormichael pereira2011-10-30 22:48:29 +0100
committermichael pereira2011-10-30 22:48:29 +0100
commit8b0c22d1bf77630dc28eb40f5a62e21e0a2ff0a6 (patch)
tree07b7ec5609a86348a49ed0a4bbd3e5c2eab2e92d /application
parentlogin (diff)
downloadpbs2-8b0c22d1bf77630dc28eb40f5a62e21e0a2ff0a6.tar.gz
pbs2-8b0c22d1bf77630dc28eb40f5a62e21e0a2ff0a6.tar.xz
pbs2-8b0c22d1bf77630dc28eb40f5a62e21e0a2ff0a6.zip
login
Diffstat (limited to 'application')
-rw-r--r--application/modules/ipxe/controllers/AuthController.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php
index 4d11298..ecbce01 100644
--- a/application/modules/ipxe/controllers/AuthController.php
+++ b/application/modules/ipxe/controllers/AuthController.php
@@ -103,17 +103,6 @@ class Ipxe_AuthController extends Zend_Controller_Action
$login = $this->_request->getParam('login');
$error = $this->_request->getParam('error');
- if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){
- header('WWW-Authenticate: Basic realm=""');
- header('HTTP/1.0 401 Unauthorized');
- $result = "#!ipxe\n";
- $result .= "imgfree\n";
- $result .= "module http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/login\n";
- header("Content-Length: ".(strlen($result)));
- echo $result;
- exit;
- }
-
if (isset($error)){
header('Content-Type: text/plain');
$result = "error";
@@ -132,6 +121,16 @@ class Ipxe_AuthController extends Zend_Controller_Action
exit;
}
+ if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){
+ header('WWW-Authenticate: Basic realm=""');
+ header('HTTP/1.0 401 Unauthorized');
+ $result = "#!ipxe\n";
+ $result .= "imgfree\n";
+ $result .= "module http://".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."/error/login\n";
+ header("Content-Length: ".(strlen($result)));
+ echo $result;
+ exit;
+ }
$email = $_SERVER['PHP_AUTH_USER'];
$password = $_SERVER['PHP_AUTH_PW'];