Fixed login bug related to docmd() options.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9297 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2011-04-13 11:48:34 +00:00
parent 99f69069ee
commit 84c28a934a

View File

@ -65,14 +65,14 @@ function submit_request($req, $skipVerify, $opts_array){
// Determine whether to flush output or not
$flush = false;
if (in_array("flush", $opts_array)) {
if ($opts_array && in_array("flush", $opts_array)) {
$flush = true;
}
// Determine how to handle the flush output
// You can specify a function name, in place of TBD, to handle the flush output
$flush_format = "";
if (in_array("flush-format=TBD", $opts_array)) {
if ($opts_array && in_array("flush-format=TBD", $opts_array)) {
$flush_format = "TBD";
}
@ -255,7 +255,7 @@ function is_logged() {
function isAuthenticated() {
if (is_logged()) {
if ($_SESSION["xcatpassvalid"] != 1) {
$testcred = docmd("authcheck", "", NULL);
$testcred = docmd("authcheck", "", NULL, NULL);
if (isset($testcred->{'xcatresponse'}->{'data'})) {
$result = "".$testcred->{'xcatresponse'}->{'data'};
if (is_numeric(strpos("Authenticated",$result))) {