Skip to content

Commit cb0be91

Browse files
author
Till Brehm
committed
Prevent 60 seconds delay in mailbox creation when mapping of mailbox zui and gid to web uid and gid is not used.
1 parent a95251e commit cb0be91

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

interface/web/mail/mail_user_edit.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,13 @@ function onSubmit() {
237237
$this->dataRecord["homedir"] = $mail_config["homedir_path"];
238238

239239
// Will be overwritten by mail_plugin
240-
$this->dataRecord['uid'] = -1;
241-
$this->dataRecord['gid'] = -1;
240+
if ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') {
241+
$this->dataRecord['uid'] = -1;
242+
$this->dataRecord['gid'] = -1;
243+
} else {
244+
$this->dataRecord['uid'] = intval($mail_config["mailuser_uid"]);
245+
$this->dataRecord['gid'] = intval($mail_config["mailuser_gid"]);
246+
}
242247

243248
//* Check if there is no alias or forward with this address
244249
$tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE active = 'y' AND source = ?", $this->dataRecord["email"]);

0 commit comments

Comments
 (0)