/**
* 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__);
}
function loginPublic()
{
+ $this->isAuth(); // force session start..
+
+ $db = $this->getDatabaseConnection();
+
+ $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());
+ $_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object)$p->toArray());
+
+ return true;
}
}