Jump to content

IPS4 external member auth


ubnt1337

Recommended Posts

I have an application that checks a login against my forum. Back in 3.4.9 the code below would let me do that. 

Could anyone help me achive the same thing in 4? 

require_once( '../forum/initdata.php' );
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' ); 

$ipbRegistry = ipsRegistry::instance();
$ipbRegistry->init();

$user = $_POST['u'];
$pass = $_POST['p'];

$cleanname = IPSText::parseCleanValue($user);
$member = IPSMember::load($cleanname, 'all', 'username');

$cleanpass = IPSText::parseCleanValue($pass);
if(IPSMember::authenticateMember($member['member_id'], $cleanpass))
{
	if (IPSMember::isInGroup($member['member_id'], 4, true) || IPSMember::isInGroup($member['member_id'], 6, true) ) //admin			
	{
		
	}
}

 

Thanks :)

Link to comment
Share on other sites

9 hours ago, Cyber1 said:

thank you, you save my day :)

 

edit: not working on ips 4.3

This isn't a tutorial. He is asking for support on how to create it for IPS 4.3.

  • Support Team - September 9th, 2017 - June 8, 2018
  • Junior Moderator - December 14th 2018 - November 16th, 2019
  • Designer - November 16th, 2019 - June 5th, 2020
  • Moderator - June 5th, 2020 - August 28th, 2020
Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...