Jump to content
FLASH SALE (EXTENDED TO 2/21/19)! Take 20% off all store products! Read more... ×
We're hiring! We are accepting applications for Junior Moderator, Uploader, and Support Team. Read more... ×
Having trouble connecting to our Discord server or has your role been mistakenly removed? Let us know! Read more... ×
  • 0
Sign in to follow this  
ubnt1337

IPS 4.3 IPS4 external member auth

Question

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 :)

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

thank you, you save my day :)

 

edit: not working on ips 4.3

Edited by Cyber1

Share this post


Link to post
Share on other sites
  • 0
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.

Share this post


Link to post
Share on other sites
What do you think? Remember the human.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×