DataObjects/Core_ip_access.php
authoredward <edward@roojs.com>
Wed, 14 Feb 2018 08:57:32 +0000 (16:57 +0800)
committeredward <edward@roojs.com>
Wed, 14 Feb 2018 08:57:32 +0000 (16:57 +0800)
DataObjects/Core_ip_access.php

index 08686ff..dc476c4 100644 (file)
@@ -35,7 +35,8 @@ class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject
                 empty($ff->Pman['XMPP']) ||
                 empty($ff->Pman['XMPP']['username']) ||
                 empty($ff->Pman['XMPP']['password']) ||
                 empty($ff->Pman['XMPP']) ||
                 empty($ff->Pman['XMPP']['username']) ||
                 empty($ff->Pman['XMPP']['password']) ||
-                empty($ff->Pman['XMPP']['to'])
+                empty($ff->Pman['XMPP']['to']) ||
+                empty($ff->Pman['XMPP']['host'])
         ) {
             return;
         }
         ) {
             return;
         }
@@ -44,7 +45,7 @@ class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject
             
         $conn = new Net_XMPP('talk.google.com', 5222, $ff->Pman['XMPP']['username'], $ff->Pman['XMPP']['password'], 'xmpphp', 'gmail.com', $printlog=false, $loglevel=Net_XMPP_Log::LEVEL_VERBOSE);
 
             
         $conn = new Net_XMPP('talk.google.com', 5222, $ff->Pman['XMPP']['username'], $ff->Pman['XMPP']['password'], 'xmpphp', 'gmail.com', $printlog=false, $loglevel=Net_XMPP_Log::LEVEL_VERBOSE);
 
-        $url = "{$ff->baseURL}/Core/VerifyAccess/{$this->id}/{$this->authorized_key}";
+        $url = "https://{$ff->baseURL}/Core/VerifyAccess/{$this->id}/{$this->authorized_key}";
         
         try {
             $conn->connect();
         
         try {
             $conn->connect();