[geeklog-cvs] Auth_Enterprise/Client AEXMLRPCClient.class.php,1.3,1.4

tony at iowaoutdoors.org tony at iowaoutdoors.org
Sat Jun 19 16:45:02 EDT 2004


Update of /var/cvs/Auth_Enterprise/Client
In directory www:/tmp/cvs-serv17885

Modified Files:
	AEXMLRPCClient.class.php 
Log Message:
authenticate now takes the encoded AEServiceUser we got from the Auth_Enterprise server and builds a valid AEUser object.

Index: AEXMLRPCClient.class.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Client/AEXMLRPCClient.class.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AEXMLRPCClient.class.php	18 Jun 2004 21:34:32 -0000	1.3
--- AEXMLRPCClient.class.php	19 Jun 2004 20:45:00 -0000	1.4
***************
*** 116,130 ****
                  , new XML_RPC_Value($password, 'string')));
          $response = $this->XMLRPCClient->send($xmlRequest);
-         print_r($response); exit;
          $retval = $response->value();
          $retval = XML_RPC_decode($retval);
-         print_r($retval); exit;
          $user = new AEUser();
-         $user->setUserId($retval['userId']);
          $user->setUserName($retval['userName']);
!         $user->setGroups($this->moveGroupsToObjects($retval['groups']));
          /*if (!$response->faultCode()) {
              
          }*/
      }
      
--- 116,147 ----
                  , new XML_RPC_Value($password, 'string')));
          $response = $this->XMLRPCClient->send($xmlRequest);
          $retval = $response->value();
          $retval = XML_RPC_decode($retval);
          $user = new AEUser();
          $user->setUserName($retval['userName']);
!         $user->setPassword($retval['password']);
!         $privArray = array();
!         foreach ($retval['privileges'] as $curPriv) {
!             $tmpPriv = new AEPrivilege();
!             $tmpPriv->setPrivilegeCode($curPriv['privilegeCode']);
!             $tmpPriv->setPrivilegeCode($curPriv['privilegeDesc']);
!             $privArray[] = $tmpPriv;
!         }
!         $user->setPrivileges($privArray);
!         
!         $groupArray[] = array();
!         foreach ($retval['groups'] as $curGroup) {
!             $tmpGroup = new AEGroup();
!             $tmpGroup->setGroupId($curGroup['groupId']);
!             $tmpGroup->setGroupLogicalName($curGroup['groupLogicalName']);
!             $tmpGroup->setGroupDisplayName($curGroup['groupDisplayName']);
!             $tmpGroup->setGroupDesc($curGroup['groupDesc']);
!             $groupArray[] = $tmpGroup;
!         }
!         $user->setGroups($groupArray);
          /*if (!$response->faultCode()) {
              
          }*/
+         return $user;
      }
      




More information about the geeklog-cvs mailing list