Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 14, 201510 yr 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"); }
February 14, 201510 yr /** * 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
February 14, 201510 yr Author /** * 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.
February 14, 201510 yr Now I'm receiving a 500 internal server error.May you share your whole script so we can see what's wrong?
February 14, 201510 yr Author 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).
February 14, 201510 yr 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
February 14, 201510 yr Author 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
February 14, 201510 yr 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
February 14, 201510 yr Author 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!
Archived
This topic is now archived and is closed to further replies.