$this->jok(array('id' => 0)); // not logged in..
exit;
}
+ $au = $u->getAuthUser();
// might occur on shared systems.
$ff= HTML_FlexyFramework::get();
- if (!empty($ff->Pman['auth_comptype']) && $ff->Pman['auth_comptype'] != $u->company()->comptype) {
- $this->jerr("Login not permited to outside companies");
+ if (!empty($ff->Pman['auth_comptype']) && $ff->Pman['auth_comptype'] != $au->company()->comptype) {
+ $au->logout();
+ $this->jerr("Login not permited to outside companies - please reload");
}
/** -- these need modulizing somehow! **/
+
+
+ // basically calls Pman_MODULE_Login::sendAuthUserDetails($aur) on all the modules
+
if ($this->hasModule('Fax')) {
// should check fax module???
$f = DB_DataObject::factory('Fax_Queue');