Code

Added funtion to retrieve a rpc handle
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 May 2010 14:34:18 +0000 (14:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 May 2010 14:34:18 +0000 (14:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18792 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_config.inc

index c0ceb969c5955d5ef976326ccbcf0b4739104b2d..0836bade54078c0a0005df402c88757dc8e8860d 100644 (file)
@@ -295,6 +295,20 @@ class config  {
   }
 
 
+  function getRpcHandle()
+  {
+      $server  =  $this->get_cfg_value('core','gosaRpcServer');
+      $user    =  $this->get_cfg_value('core','gosaRpcUser');
+      $passwd  =  $this->get_cfg_value('core','gosaRpcPassword');
+
+      $handle = new jsonRPC($server);
+      $handle->login($user, $password);
+
+      //Fixme  Add checks here - login successful aso.
+      return($handle);
+  }
+
+
   /*! \brief Get a LDAP link object
    *
    * This function can be used to get an ldap object, which in turn can