close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Need multiple tables mysqli log user

Thread began 3/01/2017 7:44 pm by Jason | Last modified 8/16/2017 2:34 pm by Ray Borduin | 420 views | 36 replies |

Jason

Need multiple tables mysqli log user

Need to used joins in the authentication

Sign in to reply to this post

Ray BorduinWebAssist

Maybe create a view from the joined tables and use that. Otherwise this is something I can help with in a premier support ticket.

Sign in to reply to this post

Vine Church

Hey Ray, this is still Jason. I forgot to create this issue on the church's account. Sorry for the mid thread switch, but I want to make sure it's all on this account if possible.

Creating the view worked (mostly). I've just got one small hangup. Previously I was using the security assist user auth, and you had helped me write some custom changes to helper_php.php (see attached lines54-63). However, the redirects are not working with the new mysqli user auth. I'm guessing it's not using the same file or functions? Can you tell me how to do the same thing with the mysqli user auth?

Sign in to reply to this post

Ray BorduinWebAssist

I really don't remember well enough to know what might be different. I don't think those lines would need to be rewritten. I think you can just set the success redirect page to the '/includes/set_sessions.php' page in the new authentication server behavior. I think as long as they both set the same session variables it should work. If not I'd need a url, steps to reproduce, and ftp access to debug it further.

Sign in to reply to this post

Vine Church

I compared var_dump($_SESSION) on the old and new versions. There are 2 missing variables on the new version, but I'm not sure where to set them. Can you tell me?

Old:
array(6) { ["WAENCRYPTEDRETURNUSED"]=> bool(false) ["WAENCRYPTEDRETURNSUCCESS"]=> bool(false) ["PCMS_ActivationError"]=> string(1) " " ["WASA_accesscheck"]=> string(39) "%2Falf%2Fcms%2Fdashboard%2Findex.php%3F" ["redirect"]=> string(1) "#" ["WAVT_login_Errors"]=> string(0) "" }

New:
array(4) { ["WAENCRYPTEDRETURNUSED"]=> bool(false) ["WAENCRYPTEDRETURNSUCCESS"]=> bool(false) ["WASA_accesscheck"]=> string(39) "%2Falf%2Fcms%2Fdashboard%2Findex.php%3F" ["redirect"]=> string(1) "#" }

Sign in to reply to this post

Ray BorduinWebAssist

Those variables aren't necessary. This looks like the Session before login? What are the two dumps of the sessions after a successful login?

Sign in to reply to this post

Vine Church

Ok, I var_dumped those and found the missing variable. It's $_SESSION['redirectGoTo']. Where should this be getting set?

Sign in to reply to this post

Ray BorduinWebAssist

We were probably setting it on the login page after the logged in based on their profile? I'd look at the original login page and see if you can find and move the code over.

Sign in to reply to this post

Vine Church

I believe it's being set in helper_php.php in the WA_AuthenticateUser function, but I can't find anywhere that the new behavior calls that function. Here's the updated behavior. Am I missing something or did I just not trace the behavior correctly?

php:
if ($_SERVER["REQUEST_METHOD"] == "POST") {

  $Authenticate = new WA_MySQLi_Auth($local_i);
  $Authenticate->Action = "authenticate";
  $Authenticate->Name = "userlogin";
  $Authenticate->Table = "login";
  $Authenticate->addFilter("email_address", "=", "s", "".((isset($_POST["Log_In_group_Username"]))?$_POST["Log_In_group_Username"]:"")  ."");
  $Authenticate->addFilter("email_verified", "=", "i", "1");
  $Authenticate->addFilter("verification_hash", "=", "s", "");
  $Authenticate->addFilter("password", "=", "s", "".WA_SHA1Encryption(((isset($_POST["Log_In_group_2_Password"]))?$_POST["Log_In_group_2_Password"]:""))  ."");
  $Authenticate->addFilter("active", "=", "i", "1");
  $Authenticate->storeResult("person", "userlogin_id");
  $Authenticate->storeResult("email_address", "username");
  $Authenticate->AutoReturn = true;
  $SuccessRedirect = "includes/set_sessions.php?loggedIn=1";
  $FailedRedirect = "login.php?failedLogin=1";
  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();
}
Sign in to reply to this post

Ray BorduinWebAssist

I think you need to find the reference to redirectGoTo in the old code. If you could show me that I could help translate it into the new.

Sign in to reply to this post
loading

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