Jump to content

IPSMembers#authenticateMember not working


Recommended Posts

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

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

Link to comment
Share on other sites

​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

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

​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!

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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