DataObjects/Core_company.php
[Pman.Core] / DataObjects / Core_person.php
index 3215bcd..1d38c88 100644 (file)
@@ -1219,16 +1219,20 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
          
         $db = $this->getDatabaseConnection();
         
-        $sesPrefix = 'Hydra-' .get_class($this) .'-'.$db->dsn['database'] ;
-
-        // we should not store the whole data in the session - otherwise it get's huge.
+        $ff = HTML_FlexyFramework::get();
+        
+        if(empty($ff->Pman) || empty($ff->Pman['login_public'])){
+            return false;
+        }
+        
+        $sesPrefix = $ff->Pman['login_public'] . '-' .get_class($this) .'-'.$db->dsn['database'] ;
+        
         $p = DB_DAtaObject::Factory($this->tableName());
         $p->get($this->pid());
         
-        //var_dump(array(get_class($this),$sesPrefix .'-auth'));
         $_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object)$p->toArray());
-        // ensure it's written so that ajax calls can fetch it..
         
+        return true;
     }
     
  }