From f5d73a97c5016b3eb41d56436df27c11a0b38ef6 Mon Sep 17 00:00:00 2001
From: Dominik Müller <info@profi-webdesign.net>
Date: Sun, 19 Jan 2014 17:54:07 -0500
Subject: [PATCH] corrected remote-function

---
 interface/lib/classes/remoting.inc.php      |   25 -------------------------
 interface/lib/classes/remote.d/mail.inc.php |    4 ++++
 2 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php
index d235d01..6695814 100644
--- a/interface/lib/classes/remote.d/mail.inc.php
+++ b/interface/lib/classes/remote.d/mail.inc.php
@@ -214,6 +214,10 @@
 			return false;
 		}
 
+		//* Set a few params to non empty values that will be overwritten by mail_plugin
+		if (!isset($params['uid'])) $params['uid'] = 999989999;
+		if (!isset($params['gid'])) $params['gid'] = 999989999;
+
 		$affected_rows = $this->insertQuery('../mail/form/mail_user.tform.php', $client_id, $params);
 		return $affected_rows;
 	}
diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 268b257..58400e4 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -184,31 +184,6 @@
 		return $app->db->affectedRows() == 1;
 	}
 
-	//* Add mail domain
-	public function mail_user_add($session_id, $client_id, $params){
-		global $app;
-	
-		if (!$this->checkPerm($session_id, 'mail_user_add')){
-			$this->server->fault('permission_denied','You do not have the permissions to access this function.');
-			return false;
-		}
-	
-		//* Check if mail domain exists
-		$email_parts = explode('@',$params['email']);
-		$tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = '".$app->db->quote($email_parts[1])."'");
-		if($tmp['domain'] != $email_parts[1]) {
-			$this->server->fault('mail_domain_does_not_exist','Mail domain - '.$email_parts[1].' - does not exist.');
-			return false;
-		}
-	
-		//* Set a few params to non empty values that will be overwritten by mail_plugin
-		if (!isset($params['uid'])) $params['uid'] = 999989999;
-		if (!isset($params['gid'])) $params['gid'] = 999989999;
-	
-		$affected_rows = $this->insertQuery('../mail/form/mail_user.tform.php', $client_id, $params);
-		return $affected_rows;
-	}
-	
 	//** protected functions -----------------------------------------------------------------------------------
 
 

--
Gitblit v1.9.1