Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
Swizzbeat Posted February 14, 2015 Share Posted February 14, 2015 No matter what I do this method just returns false. I know for a fact my user/pass are correct as well.if (IPSMember::authenticateMember("user", md5("pass"))) { echo("authenticated"); } else { echo("failed"); } Link to comment Share on other sites More sharing options...
Ahmad E. Posted February 14, 2015 Share Posted February 14, 2015 /** * Check supplied password with database * * @param string Key: either member_id or email * @param string MD5 of entered password * @return boolean Password is correct */ static public function authenticateMember( $member_key, $md5_once_password )First parameter needs to be either member_id or email, the username/displayname won't work Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 14, 2015 Author Share Posted February 14, 2015 /** * Check supplied password with database * * @param string Key: either member_id or email * @param string MD5 of entered password * @return boolean Password is correct */ static public function authenticateMember( $member_key, $md5_once_password )First parameter needs to be either member_id or email, the username/displayname won't workNow I'm receiving a 500 internal server error. Link to comment Share on other sites More sharing options...
Ahmad E. Posted February 14, 2015 Share Posted February 14, 2015 Now I'm receiving a 500 internal server error.May you share your whole script so we can see what's wrong? Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 14, 2015 Author Share Posted February 14, 2015 May you share your whole script so we can see what's wrong?What I posted is my whole script, minus the include of course (which works). Link to comment Share on other sites More sharing options...
Ahmad E. Posted February 14, 2015 Share Posted February 14, 2015 What I posted is my whole script, minus the include of course (which works).There must be an error somewhere, I've tested this and it works fine for me, share the include pls Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 14, 2015 Author Share Posted February 14, 2015 There must be an error somewhere, I've tested this and it works fine for me, share the include pls include_once("/home/public_html/forums/admin/sources/base/ipsMember.php") I seem to actually be experiencing the same error when attempting to do this with general PHP MySQLi queries. The database connection returns no errors and it's running using the same credentials as I have configured with IPBoard (which obviously runs fine). I'm also getting no server errors despite turning on logging. I have no idea what to do Link to comment Share on other sites More sharing options...
Ahmad E. Posted February 14, 2015 Share Posted February 14, 2015 include_once("/home/public_html/forums/admin/sources/base/ipsMember.php") I seem to actually be experiencing the same error when attempting to do this with general PHP MySQLi queries. The database connection returns no errors and it's running using the same credentials as I have configured with IPBoard (which obviously runs fine). I'm also getting no server errors despite turning on logging. I have no idea what to do Try this: <?php require_once( 'initdata.php' );/*noLibHook*/ require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );/*noLibHook*/ require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );/*noLibHook*/ $reg = ipsRegistry::instance(); $reg->init(); if (IPSMember::authenticateMember(1, md5("pass"))) { echo("authenticated"); } else { echo("failed"); } Make sure that the script is in your forums folder or change the path to initdata.php Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 14, 2015 Author Share Posted February 14, 2015 Try this:<?php require_once( 'initdata.php' );/*noLibHook*/ require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );/*noLibHook*/ require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );/*noLibHook*/ $reg = ipsRegistry::instance(); $reg->init(); if (IPSMember::authenticateMember(1, md5("pass"))) { echo("authenticated"); } else { echo("failed"); }Make sure that the script is in your forums folder or change the path to initdata.phpThank you so much, that worked great! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.