Code

Divlist changes
[gosa.git] / setup / class_setupStep_Welcome.inc
index 7549aaae320252a6444b11f41e17a33b2880c5f1..f030f3121191817e1c4ca690e880c4f9d8fd1163 100644 (file)
@@ -42,13 +42,28 @@ class Step_Welcome  extends setup_step
   
   function execute()
   {
-    $this->is_completed = true;
     $smarty = get_smarty();
+    $smarty->assign('auth_id', session_id());
     return($smarty->fetch(get_template_path("setup_welcome.tpl",TRUE,dirname(__FILE__))));
   }
 
   function save_object()
   {
+    $id = "";
+    
+    /* Get auth ID from file */
+    if (file_exists('/tmp/gosa.auth') && is_readable('/tmp/gosa.auth')){
+      $contents= file('/tmp/gosa.auth');
+      $id= chop($contents[0]);
+    }
+
+    /* Continue if we've the correct ID */
+    if ($id == session_id()){
+      $this->is_completed = true;
+    } else {
+      $this->is_completed = false;
+    }
+
   }
 }