public $phone_direct; // varchar(32) NOT NULL DEFAULT '';
public $countries; // VARCHAR(128) NULL;
+ public $language;
+
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
function isAuth()
{
// do not start a session if we are using http auth...
- if (empty($_SERVER['PHP_AUTH_USER']) && php_sapi_name() != "cli") {
- @session_start();
+ // we have a situation where the app is behind a http access and is also login
+ // need to work out a way to handle that.
+
+ if (php_sapi_name() != "cli" && (empty($_SERVER['PHP_AUTH_USER']) || !empty($ff->disable_http_auth))) {
+ @session_start();
}
-
- $ff= HTML_FlexyFramework::get();
+
+
$sesPrefix = $this->sesPrefix();
// http basic auth..
$u = DB_DataObject::factory($this->tableName());
- if (!empty($_SERVER['PHP_AUTH_USER'])
+ if (empty($ff->disable_http_auth) // http auth requests should not have this...
+ &&
+ !empty($_SERVER['PHP_AUTH_USER'])
&&
!empty($_SERVER['PHP_AUTH_PW'])
&&
self::$authUser = $u;
return true;
}
+
+ // at this point all http auth stuff is done, so we can init session
+
+
//die("test init");
if (!$this->canInitializeSystem()) {
// die("can not init");
$this->isAuth(); // force session start..
$sesPrefix = $this->sesPrefix();
-
$_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = -1;
-
$_SESSION[get_class($this)][$sesPrefix .'-auth'] = "";
-
self::$authUser = false;
}
)"
);
}
+ if(!empty($q['in_group_starts'])){
+
+ $v = $this->escape($q['in_group_starts']);
+
+ $this->whereAdd("
+ $tn_p.id IN (
+ SELECT
+ DISTINCT(user_id) FROM $tn_gm
+ LEFT JOIN
+ $tn_g
+ ON
+ $tn_g.id = $tn_gm.group_id
+ WHERE
+ $tn_g.name LIKE '{$v}%'
+ )"
+ );
+ }
+
+
// #2307 Search Country!!
if (!empty($q['query']['in_country'])) {
{$this->tableName()}.name LIKE '%{$this->escape($q['query']['name'])}%'
");
}
+
+ if(!empty($q['query']['name_or_email'])){
+ $v = $this->escape($q['query']['name_or_email']);
+ $this->whereAdd("
+ {$this->tableName()}.name LIKE '%{$v}%'
+ OR
+ {$this->tableName()}.email LIKE '%{$v}%'
+ ");
+ }
if(!empty($q['query']['name_starts'])){
$this->whereAdd("
{$this->tableName()}.name LIKE '{$this->escape($q['query']['name_starts'])}%'
if (!$roo->hasPerm('Core.Projects_All', 'S')) {
$peps = $p->people($pids);
- $this->whereAddIn("{$tn}.id", $peps, 'int');
+ $this->whereAddIn("{$this->tableName()}.id", $peps, 'int');
}
}
COALESCE((
SELECT
- GROUP_CONCAT( core_group.name separator '\n')
+ GROUP_CONCAT( CASE WHEN core_group.display_name = '' THEN core_group.name ELSE core_group.display_name END separator '\n')
FROM
core_group_member
LEFT JOIN
core_group.id = core_group_member.group_id
WHERE
core_group_member.user_id = core_person.id
+ ORDER BY
+ core_group.display_name ASC
), '') as member_of");
}