コード例 #1
0
ファイル: PublicAction.class.php プロジェクト: tmlsoft/main
 /**
  * @Title: setBBSCookie 
  * @Description: todo(在signin方法中调用,设置BBS的Cookie) 
  * @param unknown_type $authInfo  
  * @author liminggang 
  * @date 2014-8-28 下午6:53:36 
  * @throws
  */
 private function setBBSCookie($authInfo)
 {
     import('@.ORG.UcenterBbs', '', $ext = '.php');
     $objUcenterBbs = new UcenterBbs();
     $bbsuserinfo = $objUcenterBbs->login($authInfo['account'], $authInfo['id'], $authInfo['password']);
     if (!$bbsuserinfo) {
         $bbsuserinfo = $objUcenterBbs->register($authInfo['account'], $authInfo['id'], 5, $authInfo['password'], $authInfo['email'], $timestamp = 0);
     }
     Cookie::set("bbsuserinfo", $bbsuserinfo, C('COOKIE_EXPIRE'));
 }