Code

Updated registration process
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Nov 2010 15:44:32 +0000 (15:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Nov 2010 15:44:32 +0000 (15:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20225 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/dashBoard/Register/class_RegistrationDialog.inc

index f6add96ccea1a7fb1ed34f5e2922dc32ef0c29b5..8830663f8bb0821bea7e1abb295f6e07039ee203 100644 (file)
@@ -47,7 +47,7 @@ class RegistrationDialog extends plugin
 
                     // Try to registrate the instance with the given username and password.
                     $rpcHandle = $this->config->registration->getConnection($this->values['username'],$this->values['password']);
-                    $rpcHandle->registerInstance($this->config->getInstanceUuid());
+                    $password = $rpcHandle->registerInstance($this->config->getInstanceUuid());
                     if(!$rpcHandle->success()){
                         $code =  $rpcHandle->getHTTPstatusCode();
                         if($code == 0){
@@ -58,10 +58,18 @@ class RegistrationDialog extends plugin
                             $smarty->assign("error", _("Internal server error, please try again later. If the problem persists contact the GOsa-Team!"));
                         }
                     }else{
+                    
                         $this->step = 2;
+
+                        // Restore the registration postpone value. 
                         $prop =  $this->config->configRegistry->getProperty('GOsaRegistration','askForRegistration');
                         $prop->setValue(0);
                         $prop->save();
+
+                        // Store the returned password
+                        $prop =  $this->config->configRegistry->getProperty('GOsaRegistration','instancePassword');
+                        $prop->setValue($password);
+                        $prop->save();
                     }
                 } 
             }