projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DataObjects/Core_person.php
[Pman.Core]
/
DataObjects
/
Core_person.php
diff --git
a/DataObjects/Core_person.php
b/DataObjects/Core_person.php
index
8285350
..
0e62884
100644
(file)
--- a/
DataObjects/Core_person.php
+++ b/
DataObjects/Core_person.php
@@
-265,6
+265,7
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
// in session...
$a = unserialize($_SESSION[get_class($this)][$sesPrefix .'-auth']);
$u = DB_DataObject::factory($this->tableName());
// in session...
$a = unserialize($_SESSION[get_class($this)][$sesPrefix .'-auth']);
$u = DB_DataObject::factory($this->tableName());
+ $u->autoJoin();
if ($a->id && $u->get($a->id)) { //&& strlen($u->passwd)) {
if ($u->verifyAuth()) {
self::$authUser = $u;
if ($a->id && $u->get($a->id)) { //&& strlen($u->passwd)) {
if ($u->verifyAuth()) {
self::$authUser = $u;
@@
-406,22
+407,15
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
//var_dump(array(get_class($this),$sesPrefix .'-auth'));
if (self::$authUser) {
//var_dump(array(get_class($this),$sesPrefix .'-auth'));
if (self::$authUser) {
- $a = unserialize($_SESSION[get_class($this)][$sesPrefix .'-auth']);
-
- $u = DB_DataObject::factory($this->tableName()); // allow extending this ...
- $u->autoJoin();
- if ($u->get($a->id)) { /// && strlen($u->passwd)) { // should work out the pid .. really..
-
+
+ if (isset($_SESSION[get_class($this)][$sesPrefix .'-auth'])) {
$_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = time() + (30*60); // eg. 30 minutes
setcookie('Pman.timeout', time() + (30*60), time() + (30*60), '/');
$_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = time() + (30*60); // eg. 30 minutes
setcookie('Pman.timeout', time() + (30*60), time() + (30*60), '/');
-
- $user = clone ($u);
- return clone($user);
-
}
}
- unset($_SESSION[get_class($this)][$sesPrefix .'-auth']);
- unset($_SESSION[get_class($this)][$sesPrefix .'-timeout']);
- setcookie('Pman.timeout', -1, time() + (30*60), '/');
+
+ $user = clone (self::$authUser);
+ return clone($user);
+
}
}
@@
-501,6
+495,8
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
//var_dump(array(get_class($this),$sesPrefix .'-auth'));
$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object)$d);
//var_dump(array(get_class($this),$sesPrefix .'-auth'));
$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object)$d);
+
+
// ensure it's written so that ajax calls can fetch it..
// ensure it's written so that ajax calls can fetch it..