Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Swizzbeat Posted February 14, 2015 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"); }
Ahmad E. Posted February 14, 2015 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
Swizzbeat Posted February 14, 2015 Author 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.
Ahmad E. Posted February 14, 2015 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?
Swizzbeat Posted February 14, 2015 Author 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).
Ahmad E. Posted February 14, 2015 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
Swizzbeat Posted February 14, 2015 Author 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
Ahmad E. Posted February 14, 2015 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
Swizzbeat Posted February 14, 2015 Author 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.