diff --git a/trunk/module/common/control.php b/trunk/module/common/control.php index f12bf63cb1..d91a9202ef 100644 --- a/trunk/module/common/control.php +++ b/trunk/module/common/control.php @@ -364,6 +364,7 @@ EOT; elseif($this->app->company->guest) { $user = new stdClass(); + $user->id = 0; $user->account = 'guest'; $user->realname = 'guest'; $user->rights = $this->loadModel('user')->authorize('guest'); diff --git a/trunk/module/my/control.php b/trunk/module/my/control.php index 4ebf438573..027b5939e4 100644 --- a/trunk/module/my/control.php +++ b/trunk/module/my/control.php @@ -125,6 +125,7 @@ class my extends control /* 编辑个人档案。*/ public function editProfile() { + if($this->app->user->account == 'guest') die(js::alert('guest') . js::locate('back')); if(!empty($_POST)) { $this->user->update($this->app->user->id); @@ -142,6 +143,7 @@ class my extends control /* 查看个人档案。*/ public function profile() { + if($this->app->user->account == 'guest') die(js::alert('guest') . js::locate('back')); $this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->profile; $this->view->position[] = $this->lang->my->profile; $this->view->user = $this->user->getById($this->app->user->id);