Esempio n. 1
0
 /**
  * 接受表单处理
  */
 public function dorunAction()
 {
     /* @var $profileMenuSrv PwUserProfileMenu */
     $profileMenuSrv = Wekit::load('APPS:profile.service.PwUserProfileMenu');
     list($_left, $_tab) = $profileMenuSrv->getCurrentTab($this->getInput('_left'), $this->getInput('_tab'));
     $menus = $profileMenuSrv->getMenus();
     $currentMenu = $menus[$_left];
     $_tab && ($currentMenu = $menus[$_left]['tabs'][$_tab]);
     if (!$currentMenu) {
         $this->showError('USER:profile.extends.noexists');
     }
     $extendsSrv = new PwUserProfileExtends($this->loginUser);
     $extendsSrv->setCurrent($_left, $_tab);
     $this->runHook('c_profile_extends_dorun', $extendsSrv);
     $r = $extendsSrv->execute();
     if ($r instanceof PwError) {
         $this->showError($r->getError());
     }
     $this->showMessage('success');
 }
Esempio n. 2
0
 /**
  * 联系方式
  */
 public function contactAction()
 {
     $userInfo = Wekit::load('user.PwUser')->getUserByUid($this->loginUser->uid, PwUser::FETCH_INFO);
     $extendsSrv = new PwUserProfileExtends($this->loginUser);
     list($_left, $_tab) = $this->getMenuService()->getCurrentTab($this->getInput('_left'), $this->getInput('_tab'));
     $extendsSrv->setCurrent($_left, $_tab);
     $this->runHook('c_profile_foot_run', $extendsSrv);
     $this->setOutput($extendsSrv, 'hookSrc');
     $this->setOutput($userInfo, 'userinfo');
 }