Jump to content

IPS 4.3 External Login


Cyber1

Recommended Posts

hi, anyone can post external login for this IPS version?(IPS 4.3)

IPS 4.2 work with the code below but not working on the latest version.

require_once(dirname(__FILE__).'/../forums/init.php');
$IPSLogin = new \IPS\Login\Internal;
$IPSLogin->init();

try {
         $member = $IPSLogin->authenticate(array('auth' => $_POST['username'], 'password' => $_POST['password']));
         if ($member) {
            $expire = new \IPS\DateTime;
            $expire->add( new \DateInterval( 'P7D' ) );
            \IPS\Request::i()->setCookie( 'member_id', $member->member_id, $expire );
            \IPS\Request::i()->setCookie( 'pass_hash', $member->member_login_key, $expire );
            \IPS\Request::i()->setCookie( 'hasJS', true, $expire );
            print '<html><head><meta http-equiv="refresh" content="0;URL=\''.$prev_url.'\'"></head></html>';
         }
      } catch (Exception $e) {
         blahblah
      }

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
On 24/07/2018 at 09:10, Cyber1 said:

oi, alguém pode postar login externo para esta versão IPS? (IPS 4.3)

O IPS 4.2 trabalha com o código abaixo, mas não funciona na última versão.


 

    
                    
             
         
         
      

 

realmente não funciona, vou tentar mandar o codigo atualizado

Quase sempre tem strings que não inetam

Link to comment
Share on other sites

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