public $url_blog; // VARCHAR(256) NULL ;
public $url_twitter; // VARCHAR(256) NULL ;
public $url_linkedin; // VARCHAR(256) NULL ;
+ public $linkedin_id; // VARCHAR(256) NULL ;
public $phone_mobile; // varchar(32) NOT NULL DEFAULT '';
public $phone_direct; // varchar(32) NOT NULL DEFAULT '';
+ public $countries; // VARCHAR(128) NULL;
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
function getEmailFrom()
{
+ if (empty($this->name)) {
+ return $this->email;
+ }
return '"' . addslashes($this->name) . '" <' . $this->email . '>';
}
+
function toEventString()
{
return empty($this->name) ? $this->email : $this->name;
}
+
function verifyAuth()
{
$ff= HTML_FlexyFramework::get();
$group->get('name', 'Administrators');
$member = DB_DataObject::factory('group_members');
+ $member->autoJoin();
$member->group_id = $group->id;
+ $member->whereAdd("
+ join_user_id_id.id IS NOT NULL
+ ");
if($member->find(true)){
$default_admin = DB_DataObject::factory('Person');
if(!$default_admin->get($member->user_id)){
}
}
-
+ //var_dump($ff->Pman['local_autoauth']); var_dump($_SERVER); exit;
$u = DB_DataObject::factory('Person');
$ff = HTML_FlexyFramework::get();
if (!empty($ff->Pman['local_autoauth']) &&
$_SESSION[__CLASS__][$sesPrefix .'-auth'] = serialize($u);
return true;
}
+ //var_dump(session_id());
+ //var_dump($_SESSION[__CLASS__]);
- die("got here");
-
- if (!empty( $_SESSION[__CLASS__][$sesPrefix .'-empty'] )) {
- return false;
- }
-
+ //if (!empty( $_SESSION[__CLASS__][$sesPrefix .'-empty'] )) {
+ // return false;
+ //}
+ //die("got this far?");
// not in session or not matched...
$u = DB_DataObject::factory('Person');
$u->whereAdd(' LENGTH(passwd) > 0');
$sesPrefix = $ff->appNameShort .'-' .get_class($this) .'-'.$db->dsn['database'] ;
$_SESSION[__CLASS__][$sesPrefix .'-auth'] = "";
- unset($_SESSION[__CLASS__]);
- session_regenerate_id ( true );
+
+
+
}
function genPassKey ($t)
function applyFilters($q, $au, $roo)
{
//DB_DataObject::DebugLevel(1);
+
+ if (!empty($q['query']['is_owner'])) {
+ $this->whereAdd(" join_company_id_id.comptype = 'OWNER'");
+ }
+
if (!empty($q['query']['person_not_internal'])) {
$this->whereAdd(" join_company_id_id.isOwner = 0 ");
}
-
if (!empty($q['query']['person_internal_only_all'])) {
}
+ // #2307 Search Country!!
+ if (!empty($q['query']['in_country'])) {
+ // DB_DataObject::debugLevel(1);
+ $inc = $q['query']['in_country'];
+ $this->whereAdd("$tn_p.countries LIKE '%{$inc}%'");
+ }
+
if (!empty($q['query']['not_in_directory'])) {
// it's a Person list..
// DB_DATaobjecT::debugLevel(1);
}
+ if(!empty($q['query']['name'])){
+ $this->whereAdd("
+ Person.name LIKE '%{$this->escape($q['query']['name'])}%'
+ ");
+ }
+
if (!empty($q['query']['search'])) {
// use our magic search builder...
");*/
}
- //
}
function setFromRoo($ar, $roo)
{
}
return false;
}
- function onInsert($req, $roo)
+
+ function onInsert($req, $roo)
{
$p = DB_DataObject::factory('person');
$p->onInsert(array(), $roo);
}
}
+
+ function getEmailName()
+ {
+ $name = array();
+
+ if(!empty($this->honor)){
+ array_push($name, $this->honor);
+ }
+
+ if(!empty($this->name)){
+ array_push($name, $this->name);
+
+ return implode(' ', $name);
+ }
+
+ if(!empty($this->firstname) || !empty($this->lastname)){
+ array_push($name, $this->firstname);
+ array_push($name, $this->lastname);
+
+ $name = array_filter($name);
+
+ return $name;
+ }
+
+ return $this->email;
+ }
+
}