login mysql conversion
He ray, just trying to convert this login to mysqli and the wizard removes columns
Column: UserEmail not present within table (and alsoe UserPassword, UserID, UserGroupID, UserFirstName, UserLastName and UserEmail
<?php
if(isset($_POST["LogIN"]) || isset($_POST["LogIN_x"])){
$WA_Auth_Parameter = array(
"connection" => $PowerCMSConnection,
"database" => $database_PowerCMSConnection,
"tableName" => "pcms2_users",
"columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["userName"]))?$_POST["userName"]:"") ."".$WA_Auth_Separator."".((isset($_POST["Password"]))?$_POST["Password"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserGroupID".$WA_Auth_Separator."UserFirstName".$WA_Auth_Separator."UserLastName".$WA_Auth_Separator."UserEmail"),
"sessionNames" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."UserGroupID".$WA_Auth_Separator."UserFirstName".$WA_Auth_Separator."UserLastName".$WA_Auth_Separator."UserEmail"),
"successRedirect" => "",
"failRedirect" => "",
"gotoPreviousURL" => FALSE,
"keepQueryString" => FALSE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
also getting the ame on the forgot password page with
<?php
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)){
//WA SecurityAssist Email object="mail"
$WA_Auth_Parameter = array(
"connection" => $PowerCMSConnection,
"database" => $database_PowerCMSConnection,
"tableName" => "pcms2_users",
"filterColumn" => "UserEmail",
"filterEncryption" => "",
"columnValue" => "".((isset($_POST["Email"]))?$_POST["Email"]:"") ."",
"columnType" => "text",
"usernameColumn" => "UserEmail",
"usernameEncryption" => "",
"passwordColumn" => "UserPassword",
"passwordEncryption" => "",
"selectColumns" => array("UserEmail","UserPassword"),
"sessionVariables" => array(""),
"successRedirect" => "/admin_cms/users_login.php?emailedPassword=1",
"failRedirect" => "forgotpassword.php",
"keepQueryString" => FALSE,
"toAddressColumn" => "UserEmail",
"toAddressEncryption" => "",
"fromAddress" => "noreply@motley.site",
"fromAddressDisplay" => "Motley.site",
"subject" => "Motley.site CMS Password Reminder",
"mailBody" => "../webassist/security_assist/email/forgotpassword_email.php",
"emailFunction" => "WA_SecurityAssist_Email_1_SendMail"
);
WA_Auth_ForgotPassword($WA_Auth_Parameter);
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>