Jump to content

Remote login Help


Guest
 Share

Recommended Posts

Hi all.

I am coming to ask the community as my experience with Customer support has been, well rubbish.

I need to be able to remotely log in IPS4 forums.  There is currently no API documentation for ips4, just some vague guides.

 

I have tried implementing the SSO method via plug-in. And it kind of works.  The issue is that it does not log in all the time and u have to refresh the forums repeatedly until it logs in. I posted a forum post here(https://community.invisionpower.com/topic/422900-sso-pluggin-not-being-called-each-time/) but got no responce.

I also tried this method https://github.com/sijad/IPS4RemoteLogin which also return a success ful login message but did in fact not log you in.

Right now i simply do not know how to log in ips4 forums remotely.

 

Any advice on any method for remotely logging in in IPS4 forums would be appricated.

James

Link to comment
Share on other sites

I didn't use any of the formal methods documented here, and instead kludged together my own thing from some of the snippets of code that are documented. I'm using the following code to indicate the user's logged-in status to completely separate webpages to the IPB system on the same domain ....

 

  /* Require the init.php file from the Community Suite root directory */
  require_once '/path/to/forums/init.php';

  /* Initiate the session to verify who this user is */
  \IPS\Session\Front::i();

  // get some of the user info
  $IPB_id = \IPS\Member::loggedIn()->member_id;
  $member_group = \IPS\Member::loggedIn()->member_group_id;
  $name = \IPS\Member::loggedIn()->name;
  $email = \IPS\Member::loggedIn()->email;
  $csrfKey = \IPS\Session::i()->csrfKey; 
  $validating_status = \IPS\Member::loggedIn()->members_bitoptions['validating']; 
 


You can come up with an implementation to suit your needs by testing what those various IPS system calls return in both a logged-in and logged out status.

Be warned: on my very-low-spec development system those calls did not always return acurate 'logged in' info immediately after logging in to the forums (tho the log-out was instant), and instead needed to click around the forums a number of times (sometimes as many as 20 times) before it would accurately return the logged-in status. I've not noticed similar on my high-spec live servers, but I thought it was worth mentioning in case the same happens with you, cos otherwise you might think it doesn't work.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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