/**
* Table Definition for Person
*/
-require_once 'DB/DataObject.php';
+class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
class Pman_Core_DataObjects_Core_person extends DB_DataObject
$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize($u);
return true;
}
-
+ //die("test init");
if (!$this->canInitializeSystem()) {
+ // die("can not init");
return false;
}
function canInitializeSystem()
{
+
return !strcasecmp(get_class($this) , __CLASS__);
}
$db = $this->getDatabaseConnection();
- $ff= HTML_FlexyFramework::get();
- print_R($ff);exit;
+ $ff = HTML_FlexyFramework::get();
- $sesPrefix = 'Hydra-' .get_class($this) .'-'.$db->dsn['database'] ;
+ if(empty($ff->Pman) || empty($ff->Pman['login_public'])){
+ return false;
+ }
+
+ $sesPrefix = $ff->Pman['login_public'] . '-' .get_class($this) .'-'.$db->dsn['database'] ;
- print_R($sesPrefix);exit;
- // we should not store the whole data in the session - otherwise it get's huge.
$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;
}
}