close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

users_login.php

Thread began 6/11/2018 7:25 am by Jamie | Last modified 6/11/2018 1:18 pm by Ray Borduin | 1985 views | 8 replies |

Jamie

users_login.php

Hey Ray

On the users_login.php page, have updated the SA authenticate login

<?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);
}
?>




to

<?php
$Authenticate = new WA_MySQLi_Auth($DBConnection);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = (isset($_POST["LogIN"]) || isset($_POST["LogIN_x"]));
$Authenticate->Name = "LoggedIn";
$Authenticate->Table = "pcms2_users";
$Authenticate->addFilter("UserEmail", "=", "s", "".((isset($_POST["userName"]))?$_POST["userName"]:"") ."");
$Authenticate->addFilter("UserPassword", "=", "s", "".((isset($_POST["Password"]))?$_POST["Password"]:"") ."");
$Authenticate->storeResult("UserID", "UserID");
$Authenticate->storeResult("UserGroupID", "UserGroupID");
$Authenticate->storeResult("UserFirstName", "UserFirstName");
$Authenticate->storeResult("UserLastName", "UserLastName");
$Authenticate->storeResult("UserEmail", "UserEmail");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "";
$FailedRedirect = "";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();
?>



the resulting page is blank and the error is

Warning: require_once(../webassist/mysqli/authentication.php): failed to open stream: No such file or directory in /home/motle7bk/public_html/clients/template/admin_cms/users_login.php on line 21

Fatal error: require_once(): Failed opening required '../webassist/mysqli/authentication.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/motle7bk/public_html/clients/template/admin_cms/users_login.php on line 21



have checked the webassist/mysqli/ folder and authentication.php has not been created

Sign in to reply to this post

Ray BorduinWebAssist

Just create a blank page and apply the server behavior... maybe even just open and re-apply the server behavior and it should create that file so you can upload it. My guess is that it isn't created when updating from the old version.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

'fraid thats not worked. set up a new page without it on and authentication.php was not created.

using latest posted version of DA and cc2015

Sign in to reply to this post

Ray BorduinWebAssist

Odd... I just created a blank page and applied the authentication server behavior from MySQLi and the file was created. Which server behavior did you apply? Message me in Skype and we can do a screen share to look into it more.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

hve tried accessing SA > Authenticate User from both main tool bar as well as the server behaviours area

Sign in to reply to this post

Ray BorduinWebAssist

Use the server behavior: Webassist->MysQLi->User Authentication->MySQLi Log In User

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

ok thats done it, thank you. Only problem is that as super admin am no longer able to login in - just keeps redirecting to itself

have attached the page

EDIT...it seems to only be Super Admin as Admin and below are logging in fine

Sign in to reply to this post

Ray BorduinWebAssist

It probably has something to do with the super admin rule and the validation on the super admin landing page: settings_sections_update.php

I'd have to debug it in place to see. Maybe in our next premium support ticket.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

ok will do...will have to revert it for now

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...