Example #1
0
 public function synLogin($uid)
 {
     Wind::import('SRC:service.user.bo.PwUserBo');
     Wind::import('SRC:service.user.srv.PwLoginService');
     $userBo = new PwUserBo($uid);
     $srv = new PwLoginService();
     $ip = Wind::getApp()->getRequest()->getClientIp();
     $srv->welcome($userBo, $ip);
     return true;
 }
Example #2
0
 /**
  * 完成注册,显示欢迎信息
  */
 public function welcomeAction()
 {
     if (!$this->getInput('_statu')) {
         $this->forwardRedirect(WindUrlHelper::createUrl('u/register/run'));
     }
     $statu = $this->checkRegisterUser();
     if (Pw::getstatus($this->loginUser->info['status'], PwUser::STATUS_UNACTIVE)) {
         $this->forwardAction('u/register/sendActiveEmail', array('_statu' => $statu), true);
     }
     Wind::import('SRV:user.srv.PwLoginService');
     $login = new PwLoginService();
     $login->welcome($this->loginUser, $this->getRequest()->getClientIp());
     $this->forwardRedirect(WindUrlHelper::createUrl('u/register/guide'));
 }
Example #3
0
 /**
  * 登录成功
  */
 public function welcomeAction()
 {
     $identify = $this->checkUserInfo();
     if (Pw::getstatus($this->loginUser->info['status'], PwUser::STATUS_UNACTIVE)) {
         Wind::import('SRV:user.srv.PwRegisterService');
         $identify = PwRegisterService::createRegistIdentify($this->loginUser->uid, $this->loginUser->info['password']);
         $this->forwardAction('u/register/sendActiveEmail', array('_statu' => $identify, 'from' => 'login'), true);
     }
     $login = new PwLoginService();
     $login->welcome($this->loginUser, $this->getRequest()->getClientIp());
     list(, $refUrl) = explode('|', base64_decode($identify));
     if (Pw::getstatus($this->loginUser->info['status'], PwUser::STATUS_UNCHECK)) {
         $this->forwardRedirect(WindUrlHelper::createUrl('u/login/show', array('backurl' => $refUrl)));
     }
     if (!$refUrl) {
         $refUrl = Wekit::app()->baseUrl;
     }
     $config = Wekit::C('site');
     if ($config['windid'] == 'local') {
         $this->forwardRedirect($refUrl);
     } else {
         $synLogin = $this->_getWindid()->synLogin($this->loginUser->uid);
         $this->setOutput($this->loginUser->username, 'username');
         $this->setOutput($refUrl, 'refUrl');
         $this->setOutput($synLogin, 'synLogin');
     }
 }