Ejemplo n.º 1
0
 /**
  * @brief	[Session]获取用户SESSION信息
  * @param	array	$arrUids	用户ID数组
  * @return	用户不存在或交互失败返回false,否则返回关联数组
  * @note 
  * @author	fanmengzhe
  * @date	2011/02/17 14:20:35
  **/
 public static function uidGetInfoTime($arrUids)
 {
     $ins = Bd_Passport_Session::getInstance();
     $ret = $ins->uidGetInfoTime($arrUids);
     if ($ins->isError()) {
         self::$_errno = $ins->getCode();
         self::$_errmsg = $ins->getMessage();
         return false;
     } else {
         return $ret;
     }
 }
Ejemplo n.º 2
0
 /**
  * @brief	Talk With Session
  *
  */
 protected static function _____($strMethod, $arrInput)
 {
     $ins = Bd_Passport_Interact::getEngine('Ral');
     //Fix Clientip . NET-ORDER , Int32(Neither UInt32 nor Long)
     $arrInput['clientip'] = Bd_Passport_Util::ip2int(CLIENT_IP);
     //If @ORP , Need Pass(ie, Session Key)
     if (self::$_is_orp) {
         $arrInput['pass'] = self::$_pass;
     }
     //If the session server is busy , Just retry once.
     $retry = 1;
     while ($retry >= 0) {
         // Do Interaction CALL HERE !!!
         $ret = $ins->Call('session', $strMethod, $arrInput);
         if (is_array($ret) && isset($ret['status'])) {
             self::$_errno = $ret['status'];
             //if (self::$_errno != 0) {
             //	Bd_Passport_Log::warning(self::$errmsgMap[self::$_errno], self::$_errno);
             //}
             if (self::RET_SSN2_SERVER_BUSY === $ret['status']) {
                 Bd_Passport_Log::warning(self::$errmsgMap[self::$_errno], self::$_errno);
                 --$retry;
                 continue;
             } else {
                 return $ret;
             }
         } else {
             //Let errno not defined , getMessage will return 'Unknown error'.
             Bd_Passport_Log::warning('Unknown Error', self::$_errno);
             self::$_errno = -1;
             return false;
         }
     }
     return false;
 }