Jump to content

IPSMembers#authenticateMember not working


Recommended Posts

Posted

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

 

Posted
/**
	 * 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

Posted
/**
	 * 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

​Now I'm receiving a 500 internal server error.

Posted

​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

Posted

​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 :(

Posted
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

Posted

​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

​Thank you so much, that worked great!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...