if (!empty($_SESSION[get_class($this)][$sesPrefix .'-auth'])) {
// in session...
$a = unserialize($_SESSION[get_class($this)][$sesPrefix .'-auth']);
-
-
+
$u = DB_DataObject::factory($this->tableName());
if ($a->id && $u->get($a->id)) { //&& strlen($u->passwd)) {
}
// open up iptables at login..
- $dbname = $this->database();
+ $dbname = $this->databaseNickname();
touch( '/tmp/run_pman_admin_iptables-'.$dbname);
// refresh admin group if we are logged in as one..
$appname = empty($ff->appNameShort) ? $ff->project : $ff->project . '-' . $ff->appNameShort;
- $db = $this->getDatabaseConnection();
+ $dname = method_exists($this, 'getDatabaseConnection') ? $this->getDatabaseConnection()->dsn['database'] : $this->databaseNickname();
- $sesPrefix = $appname.'-' .get_class($this) .'-'.$db->dsn['database'] ;
+ $sesPrefix = $appname.'-' .get_class($this) .'-' . $dname;
return $sesPrefix;
}
} else {
$col = $au->tableName() == "Person" ? 'person_id' : $au->tableName() . '_id';
// does $col exist?
- $cols = $this->table();
+ $cols = $this->tableColumns();
$col = isset($cols[$col]) ? $col : 'person_id'; // for BC.... - revert to using person_id
$this->{$col} = $au->pid();
//$this->person_id = $au ? (!empty($au->id) ? $au->id : $au->pid()) : -1;