projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5924bba
)
enable statick access to getAuthUser
author
Alan Knowles
<alan@roojs.com>
Wed, 6 Jan 2021 05:52:33 +0000
(13:52 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 6 Jan 2021 05:52:33 +0000
(13:52 +0800)
Pman.php
patch
|
blob
|
history
diff --git
a/Pman.php
b/Pman.php
index
a1a6170
..
ba45a32
100644
(file)
--- a/
Pman.php
+++ b/
Pman.php
@@
-255,17
+255,9
@@
class Pman extends HTML_FlexyFramework_Page
}
}
-
- /**
- * getAuthUser: - get the authenticated user..
- *
- * @return {DB_DataObject} of type Pman[authTable] if authenticated.
- */
-
- function getAuthUser()
- {
- if (!empty($this->authUser)) {
- return $this->authUser;
+ static function staticGetAuthUser($t) {
+ if (!empty($t->authUser)) {
+ return $t->authUser;
}
$ff = HTML_FlexyFramework::get();
$tbl = empty($ff->Pman['authTable']) ? 'core_person' : $ff->Pman['authTable'];
}
$ff = HTML_FlexyFramework::get();
$tbl = empty($ff->Pman['authTable']) ? 'core_person' : $ff->Pman['authTable'];
@@
-275,8
+267,20
@@
class Pman extends HTML_FlexyFramework_Page
if (is_a($u,'PEAR_Error') || !$u->isAuth()) {
return false;
}
if (is_a($u,'PEAR_Error') || !$u->isAuth()) {
return false;
}
- $this->authUser =$u->getAuthUser();
- return $this->authUser ;
+ $t->authUser =$u->getAuthUser();
+ return $t->authUser ;
+
+ }
+
+ /**
+ * getAuthUser: - get the authenticated user..
+ *
+ * @return {DB_DataObject} of type Pman[authTable] if authenticated.
+ */
+
+ function getAuthUser()
+ {
+ return staticGetAuthUser($this);
}
/**
* hasPerm:
}
/**
* hasPerm: