projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e1c4429
)
Pman/Login.php
author
Alan Knowles
<alan@akbkhome.com>
Thu, 16 Dec 2010 03:15:45 +0000
(11:15 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 16 Dec 2010 03:15:45 +0000
(11:15 +0800)
Pman/Login.php
patch
|
blob
|
history
diff --git
a/Pman/Login.php
b/Pman/Login.php
index
7fc99ef
..
1839cdd
100644
(file)
--- a/
Pman/Login.php
+++ b/
Pman/Login.php
@@
-129,14
+129,16
@@
class Pman_Login extends Pman
if (!$this->authUser || ($this->authUser->company_id_comptype != 'OWNER') || !$this->hasPerm('Core.Person', 'E')) {
$this->jerr("User switching not permitted");
}
if (!$this->authUser || ($this->authUser->company_id_comptype != 'OWNER') || !$this->hasPerm('Core.Person', 'E')) {
$this->jerr("User switching not permitted");
}
-
+ $old = clone($this->authUser);
$tbl = empty($ff->Pman['authTable']) ? 'Person' : $ff->Pman['authTable'];
$u = DB_DataObject::factory($tbl);
$u->get($id);
if (!$u->active()) {
$this->jerr('Account disabled');
}
$tbl = empty($ff->Pman['authTable']) ? 'Person' : $ff->Pman['authTable'];
$u = DB_DataObject::factory($tbl);
$u->get($id);
if (!$u->active()) {
$this->jerr('Account disabled');
}
-
+ $u->login();
+ // we might need this later..
+ $this->addEvent("SWITCH USER", false, session_id());
}
}