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($_COOKIE['PHPSESSID']) // 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");
}
if(!empty($q['query']['name_or_email'])){
+ $v = $this->escape($q['query']['name_or_email']);
$this->whereAdd("
- {$this->tableName()}.name LIKE '%{$this->escape($q['query']['name'])}%'
+ {$this->tableName()}.name LIKE '%{$v}%'
OR
- {$this->tableName()}.email LIKE '%{$this->escape($q['query']['name'])}%'
+ {$this->tableName()}.email LIKE '%{$v}%'
");
}
if(!empty($q['query']['name_starts'])){