Auth
[ class tree: Auth ] [ index: Auth ] [ all elements ]

Source for file PEAR.php

Documentation is available at PEAR.php

  1. <?php
  2.  
  3. include_once('XML/RPC.php');
  4.  
  5. class Auth_Container_Pear {
  6.     function Auth_Container_pear()
  7.     {
  8.     
  9.     }
  10.     
  11.     function fetchData($username$password)
  12.     {
  13.         $rpc = new XML_RPC_Client('/xmlrpc.php''pear.php.net');
  14.         $rpc_message = new XML_RPC_Message("user.info"array(new XML_RPC_Value($username"string")) );
  15.         // Error Checking howto ???
  16.         $result $rpc->send($rpc_message);
  17.         $value $result->value();
  18.         $userinfo = xml_rpc_decode($value);
  19.         if ($userinfo['password'== md5($password)) {
  20.             $this->activeUser $userinfo['handle'];
  21.             foreach ($userinfo as $uk=>$uv{
  22.                 $this->_auth_obj->setAuthData($uk$uv);
  23.             }
  24.             return true;
  25.         }
  26.         return false;
  27.     }
  28.     
  29. }
  30. ?>

Documentation generated on Mon, 11 Mar 2019 13:52:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.