Skip to content

Commit e24a544

Browse files
committed
Only in edit mode
1 parent 0d933fc commit e24a544

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

interface/web/mail/mail_user_edit.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ function onShowEnd() {
143143
$global_config = $app->getconf->get_global_config();
144144
$app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']);
145145

146-
# Get addresses for this account.
147-
$addresses = $app->db->queryAllRecords("SELECT source, type FROM mail_forwarding WHERE destination = ? AND ".$app->tform->getAuthSQL('r'), $email);
148-
$app->tpl->setLoop("mail_addresses", $addresses);
146+
if($this->id > 0) {
147+
# Get addresses for this account.
148+
$addresses = $app->db->queryAllRecords("SELECT source, type FROM mail_forwarding WHERE destination = ? AND ".$app->tform->getAuthSQL('r'), $email);
149+
$app->tpl->setLoop("mail_addresses", $addresses);
150+
}
149151

150152
parent::onShowEnd();
151153
}

0 commit comments

Comments
 (0)