Эх сурвалжийг харах

try to get connectiontest running

andre 2 жил өмнө
parent
commit
3972cd1f34

+ 8 - 9
api/class/KerioApi.php

@@ -286,15 +286,6 @@ class KerioApi implements KerioApiInterface {
 	 */
 	 */
 	public function login($hostname, $username, $password) {
 	public function login($hostname, $username, $password) {
 		$this->clean();
 		$this->clean();
-
-		logModuleCall(
-			'kerioEmail',
-			__FUNCTION__,
-			$username,
-			'Debug Kerio Api 1',
-			$this->application
-		);
-
 		if (empty($hostname)) {
 		if (empty($hostname)) {
 			throw new KerioApiException('Cannot login. Hostname not set.');
 			throw new KerioApiException('Cannot login. Hostname not set.');
 		}
 		}
@@ -305,6 +296,14 @@ class KerioApi implements KerioApiInterface {
 			throw new KerioApiException('Cannot login. Application not defined.');
 			throw new KerioApiException('Cannot login. Application not defined.');
 		}
 		}
 
 
+		logModuleCall(
+			'kerioEmail',
+			__FUNCTION__,
+			$hostname,
+			'Debug Kerio Api 1',
+			$this->application
+		);
+
 		$this->setHostname($hostname);
 		$this->setHostname($hostname);
 
 
 		$method = 'Session.login';
 		$method = 'Session.login';