projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DataObjects/Core_company.php
[Pman.Core]
/
DataObjects
/
Core_person.php
diff --git
a/DataObjects/Core_person.php
b/DataObjects/Core_person.php
index
69b933a
..
b22033e
100644
(file)
--- a/
DataObjects/Core_person.php
+++ b/
DataObjects/Core_person.php
@@
-290,8
+290,8
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
$u->checkPassword($_SERVER['PHP_AUTH_PW'])
) {
// logged in via http auth
$u->checkPassword($_SERVER['PHP_AUTH_PW'])
) {
// logged in via http auth
-
- $_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize($u);
+ // http auth will not need session...
+
//
$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize($u);
self::$authUser = $u;
return true;
}
self::$authUser = $u;
return true;
}
@@
-306,16
+306,20
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
if (!empty($ff->Pman['local_autoauth']) && $ff->Pman['local_autoauth'] === true) {
$auto_auth_allow = true;
}
if (!empty($ff->Pman['local_autoauth']) && $ff->Pman['local_autoauth'] === true) {
$auto_auth_allow = true;
}
- if (
- (!empty($_SERVER['SERVER_ADDR'])) &&
- (
- $_SERVER['SERVER_ADDR'] == '127.0.0.1' &&
- $_SERVER['REMOTE_ADDR'] == '127.0.0.1'
- )
- ||
+ if ( !empty($ff->Pman['local_autoauth'])
+ &&
+ !empty($_SERVER['SERVER_ADDR']) &&
+ !empty($_SERVER['REMOTE_ADDR']) &&
(
(
- $_SERVER['SERVER_ADDR'] == '::1' &&
- $_SERVER['REMOTE_ADDR'] == '::1'
+ (
+ $_SERVER['SERVER_ADDR'] == '127.0.0.1' &&
+ $_SERVER['REMOTE_ADDR'] == '127.0.0.1'
+ )
+ ||
+ (
+ $_SERVER['SERVER_ADDR'] == '::1' &&
+ $_SERVER['REMOTE_ADDR'] == '::1'
+ )
)
){
)
){
@@
-341,6
+345,7
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
");
if($member->find(true)){
$default_admin = DB_DataObject::factory($this->tableName());
");
if($member->find(true)){
$default_admin = DB_DataObject::factory($this->tableName());
+ $default_admin->autoJoin();
if(!$default_admin->get($member->user_id)){
$default_admin = false;
}
if(!$default_admin->get($member->user_id)){
$default_admin = false;
}
@@
-349,16
+354,17
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
//var_dump($ff->Pman['local_autoauth']); var_dump($_SERVER); exit;
$u = DB_DataObject::factory($this->tableName());
//var_dump($ff->Pman['local_autoauth']); var_dump($_SERVER); exit;
$u = DB_DataObject::factory($this->tableName());
+ $u->autoJoin();
$ff = HTML_FlexyFramework::get();
$ff = HTML_FlexyFramework::get();
- if ($auto_auth_allow &&
+ if ($auto_auth_allow &&
($default_admin || $u->get('email', $ff->Pman['local_autoauth']))
) {
$user = $default_admin ? $default_admin->toArray() : $u->toArray();
// if we request other URLS.. then we get auto logged in..
($default_admin || $u->get('email', $ff->Pman['local_autoauth']))
) {
$user = $default_admin ? $default_admin->toArray() : $u->toArray();
// if we request other URLS.. then we get auto logged in..
- self::$authUser = $
u
;
+ self::$authUser = $
default_admin ? $default_admin : $u;
;
//$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object) $user);
return true;
}
//$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object) $user);
return true;
}
@@
-687,7
+693,7
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
$aur['require_oath'] = 1;
$s = DB_DataObject::Factory('core_setting');
$aur['require_oath'] = 1;
$s = DB_DataObject::Factory('core_setting');
- $oath_require = $s->lookup('core', 'two_factor_auth
entication_requirement
');
+ $oath_require = $s->lookup('core', 'two_factor_auth
_required
');
$aur['require_oath'] = $oath_require ? $oath_require->val : 0;
return $aur;
$aur['require_oath'] = $oath_require ? $oath_require->val : 0;
return $aur;