close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

login mysql conversion

Thread began 5/15/2018 3:52 am by Jamie | Last modified 5/15/2018 3:02 pm by Ray Borduin | 70 views | 3 replies |

Jamie

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;
}
}
?>
Sign in to reply to this post

Ray BorduinWebAssist

What page on what site? I'll have to open the file and debug it.

Sign in to reply to this post

Jamie

I think I have the first one sorted but the second one is on the site you helped me with the other day and its in the admin_cms folder and is forgotpassword.php

Sign in to reply to this post

Ray BorduinWebAssist

I seem to be able to open the forgot password SecurityAssist Email Password server behavior without errors.

What are the steps to reproduce the problem? What is the site and page you are opening? I'll need to reproduce the issue to work on it, but so far I've been unable to.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...