DataObjects/core.sql
[Pman.Core] / DataObjects / Person.php
index 1049bfa..02c363d 100644 (file)
@@ -232,7 +232,7 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
             
             // force a logout - without a check on the isAuth - as this is called from there..
             $db = $this->getDatabaseConnection();
-            $sesPrefix = get_class($this) .'-'.$db->dsn['database'] ;
+            $sesPrefix = $ff->appNameShort .'-'.get_class($this) .'-'.$db->dsn['database'] ;
             $_SESSION[__CLASS__][$sesPrefix .'-auth'] = "";
             return false;
             
@@ -250,7 +250,8 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
         // we combine db + project names,
         // otherwise if projects use different 'auth' objects
         // then we get unserialize issues.
-        $sesPrefix = get_class($this) .'-'.$db->dsn['database'] ;
+        $ff= HTML_FlexyFramework::get();
+        $sesPrefix = $ff->appNameShort .'-' .get_class($this) .'-'.$db->dsn['database'] ;
         
         
         @session_start();
@@ -325,8 +326,10 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
             return false;
         }
         $db = $this->getDatabaseConnection();
-        $sesPrefix = get_class($this) .'-'.$db->dsn['database'] ;
         
+        $ff= HTML_FlexyFramework::get();
+        $sesPrefix = $ff->appNameShort .'-' .get_class($this) .'-'.$db->dsn['database'] ;
+
         
         
         if (!empty($_SESSION[__CLASS__][$sesPrefix .'-auth'])) {
@@ -384,16 +387,20 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
             $gr = DB_DataObject::Factory('group_rights');
             $gr->applyDefs($g, 0);
         }
-             
-        $sesPrefix = get_class($this) .'-'.$db->dsn['database'] ;
+        $ff= HTML_FlexyFramework::get();
+        $sesPrefix = $ff->appNameShort .'-' .get_class($this) .'-'.$db->dsn['database'] ;
+
+
         $_SESSION[__CLASS__][$sesPrefix .'-auth'] = serialize($this);
         
     }
     function logout()
     {
         $this->isAuth(); // force session start..
-         $db = $this->getDatabaseConnection();
-        $sesPrefix = get_class($this) .'-'.$db->dsn['database'] ;
+        $db = $this->getDatabaseConnection();
+        $ff= HTML_FlexyFramework::get();
+        $sesPrefix = $ff->appNameShort .'-' .get_class($this) .'-'.$db->dsn['database'] ;
+
         $_SESSION[__CLASS__][$sesPrefix .'-auth'] = "";
         
     }    
@@ -464,7 +471,7 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
         if (!func_num_args()) {
             return $this->lang;
         }
-        $val = array_shift(func_num_args());
+        $val = array_shift(func_get_args());
         if ($val == $this->lang) {
             return;
         }