return true;
}
+ // http basic auth..
+ $u = DB_DataObject::factory('Person');
+
+ if (!empty($_SERVER['PHP_AUTH_USER'])
+ &&
+ !empty($_SERVER['PHP_AUTH_PW'])
+ &&
+ $u->get('email', $_SERVER['PHP_AUTH_USER'])
+ &&
+ $u->checkPassword($_SERVER['PHP_AUTH_PW'])
+ ) {
+ $_SESSION[__CLASS__][$sesPrefix .'-auth'] = serialize($u);
+ return true;
+ }
+
+
+
// not in session or not matched...
$u = DB_DataObject::factory('Person');
$x->get($this->company_id);
return $x;
}
-
+ function loadCompany()
+ {
+ $this->company = $this->company();
+ }
function active()
{
if (!empty($q['query']['person_not_internal'])) {
$this->whereAdd(" join_company_id_id.isOwner = 0 ");
}
+
+
if (!empty($q['query']['person_internal_only_all'])) {
if ( $q['query']['not_in_directory'] > -1) {
$tn_pd = DB_DataObject::Factory('ProjectDirectory')->tableName();
// can list current - so that it does not break!!!
- $x->whereAdd("$tn_p.id NOT IN
+ $this->whereAdd("$tn_p.id NOT IN
( SELECT distinct person_id FROM $tn_pd WHERE
project_id = " . $q['query']['not_in_directory'] . " AND
company_id = " . $this->company_id . ')');
}
}
+
+ if (!empty($q['query']['role'])) {
+ // it's a Person list..
+ // DB_DATaobjecT::debugLevel(1);
+
+ // specific to project directory which is single comp. login
+ //
+ $tn_pd = DB_DataObject::Factory('ProjectDirectory')->tableName();
+ // can list current - so that it does not break!!!
+ $this->whereAdd("$tn_p.id IN
+ ( SELECT distinct person_id FROM $tn_pd WHERE
+ role = '". $this->escape($q['query']['role']) ."'
+ )");
+
+ }
if (!empty($q['query']['project_member_of'])) {