Example #1
0
 public function GetOneTimeKey($key)
 {
     $ViAccount = new CVoxImplantAccount();
     $accountName = $ViAccount->GetAccountName();
     if (!$accountName) {
         $this->error = new CVoxImplantError(__METHOD__, $ViAccount->GetError()->code, GetMessage('VI_GET_ACCOUNT_INFO', array('#CODE#' => $ViAccount->GetError()->code)));
         return false;
     }
     $ViUser = new CVoxImplantUser();
     $userInfo = $ViUser->GetUserInfo($this->userId);
     if (!$userInfo) {
         $this->error = new CVoxImplantError(__METHOD__, $ViUser->GetError()->code, GetMessage('VI_GET_USER_INFO', array('#CODE#' => $ViUser->GetError()->code)));
         return false;
     }
     return md5($key . "|" . md5($userInfo['user_login'] . ":voximplant.com:" . $userInfo['user_password']));
 }