patch for password entry (Pavel)

This commit is contained in:
Roland Gruber 2012-02-16 06:43:34 +00:00
parent 483d5a4718
commit a622196016
1 changed files with 3 additions and 2 deletions

View File

@ -323,11 +323,12 @@ class imapAccess extends baseModule {
$imap_server_address = $this->getServerAddress(); $imap_server_address = $this->getServerAddress();
$imap_admin_user = $this->moduleSettings['ImapAccess_ImapAdmin'][0]; $imap_admin_user = $this->moduleSettings['ImapAccess_ImapAdmin'][0];
if (isset($_POST['ImapAdminPassword'])) { if (isset($_POST['ImapAdminPassword']) && isset($_POST['enterPasswordButton'])) {
$errors = $this->doLogin(); $errors = $this->doLogin();
} }
$imap_admin_password = $this->getAdminPassword(); $imap_admin_password = $this->getAdminPassword();
$mbox = 0;//default state is false
if ($imap_admin_password) { if ($imap_admin_password) {
$mbox = @imap_open("{" . $imap_server_address . "}", $imap_admin_user, $imap_admin_password, OP_HALFOPEN, 1); $mbox = @imap_open("{" . $imap_server_address . "}", $imap_admin_user, $imap_admin_password, OP_HALFOPEN, 1);
} }