Skip to content

Commit 000225f

Browse files
committed
Merge branch 'vmailuid' of /home/git/repositories/renky/ispconfig3
2 parents 821e6b8 + f5d73a9 commit 000225f

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

interface/lib/classes/remote.d/mail.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ public function mail_user_add($session_id, $client_id, $params){
214214
return false;
215215
}
216216

217+
//* Set a few params to non empty values that will be overwritten by mail_plugin
218+
if (!isset($params['uid'])) $params['uid'] = 999989999;
219+
if (!isset($params['gid'])) $params['gid'] = 999989999;
220+
217221
$affected_rows = $this->insertQuery('../mail/form/mail_user.tform.php', $client_id, $params);
218222
return $affected_rows;
219223
}

interface/lib/classes/remoting.inc.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -184,31 +184,6 @@ public function logout($session_id)
184184
return $app->db->affectedRows() == 1;
185185
}
186186

187-
//* Add mail domain
188-
public function mail_user_add($session_id, $client_id, $params){
189-
global $app;
190-
191-
if (!$this->checkPerm($session_id, 'mail_user_add')){
192-
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
193-
return false;
194-
}
195-
196-
//* Check if mail domain exists
197-
$email_parts = explode('@',$params['email']);
198-
$tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = '".$app->db->quote($email_parts[1])."'");
199-
if($tmp['domain'] != $email_parts[1]) {
200-
$this->server->fault('mail_domain_does_not_exist','Mail domain - '.$email_parts[1].' - does not exist.');
201-
return false;
202-
}
203-
204-
//* Set a few params to non empty values that will be overwritten by mail_plugin
205-
if (!isset($params['uid'])) $params['uid'] = 999989999;
206-
if (!isset($params['gid'])) $params['gid'] = 999989999;
207-
208-
$affected_rows = $this->insertQuery('../mail/form/mail_user.tform.php', $client_id, $params);
209-
return $affected_rows;
210-
}
211-
212187
//** protected functions -----------------------------------------------------------------------------------
213188

214189

0 commit comments

Comments
 (0)