projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0b88920
)
RooTrait.php
author
edward
<edward@roojs.com>
Wed, 30 Mar 2016 10:30:59 +0000
(18:30 +0800)
committer
edward
<edward@roojs.com>
Wed, 30 Mar 2016 10:30:59 +0000
(18:30 +0800)
RooTrait.php
patch
|
blob
|
history
diff --git
a/RooTrait.php
b/RooTrait.php
index
c9de7c4
..
26057e6
100644
(file)
--- a/
RooTrait.php
+++ b/
RooTrait.php
@@
-366,8
+366,23
@@
trait Pman_Core_RooTrait {
$e->onInsert(isset($_REQUEST) ? $_REQUEST : array() , $this);
$e->onInsert(isset($_REQUEST) ? $_REQUEST : array() , $this);
-
return $e;
}
return $e;
}
+
+ function getAuthUser()
+ {
+ if (!empty($this->authUser)) {
+ return $this->authUser;
+ }
+ $ff = HTML_FlexyFramework::get();
+ $tbl = empty($ff->Pman['authTable']) ? 'Person' : $ff->Pman['authTable'];
+
+ $u = DB_DataObject::factory( $tbl );
+ if (!$u->isAuth()) {
+ return false;
+ }
+ $this->authUser =$u->getAuthUser();
+ return $this->authUser ;
+ }
}
}