/**
* 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__);
}
$ff= HTML_FlexyFramework::get();
$appname = empty($ff->appNameShort) ? $ff->project : $ff->project . '-' . $ff->appNameShort;
- print_R($appname);exit;
+
$db = $this->getDatabaseConnection();
$sesPrefix = $appname.'-' .get_class($this) .'-'.$db->dsn['database'] ;
$db = $this->getDatabaseConnection();
- $ff= HTML_FlexyFramework::get();
+ $ff = HTML_FlexyFramework::get();
- if(empty($ff->Pman) || empty($ff->Pman->login_public)){
+ if(empty($ff->Pman) || empty($ff->Pman['login_public'])){
return false;
}
- $sesPrefix = 'Hydra-' .get_class($this) .'-'.$db->dsn['database'] ;
+ $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;
}
}