From 59e9635e9049b7a4212f3f9d285fdacbb61d694c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 21:38:07 +0100 Subject: [PATCH] refactoring --- lam/lib/modules/imapAccess.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index e421dde8..f9bc9633 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -226,18 +226,18 @@ class imapAccess extends baseModule { $prefix = $this->getMailboxPrefix(); $email_domain = substr(strstr($this->email, '@'), 1); - $password = $this->getAdminPassword(); // check for password for fall back mechanism - if (!isset($_SESSION['imapAdmPass']) && !isset($password)) { + $adminPassword = $this->getAdminPassword(); // check for password for fall back mechanism + if (!isset($_SESSION['imapAdmPass']) && !isset($adminPassword)) { return $this->display_html_password(); } $return->addLabel(new htmlOutputText(_('Email address'))); $return->addField(new htmlOutputText($this->email)); - $user = $this->getAdminUser(); - $password = $this->getAdminPassword(); + $adminUser = $this->getAdminUser(); + $adminPassword = $this->getAdminPassword(); try { - $client = $this->connect($user, $password); + $client = $this->connect($adminUser, $adminPassword); } catch (LAMException $e) { return $this->display_html_password(new htmlStatusMessage('ERROR', $e->getTitle(), $e->getMessage())); @@ -635,11 +635,11 @@ class imapAccess extends baseModule { */ function doLogin() { $errors = array(); - $user = $this->getAdminUser(); + $adminUser = $this->getAdminUser(); if (isset($_POST['ImapAdminPassword']) && $_POST['ImapAdminPassword'] != "") { - $password = $_POST['ImapAdminPassword']; + $adminPassword = $_POST['ImapAdminPassword']; try { - $client = $this->connect($user, $password); + $client = $this->connect($adminUser, $adminPassword); $_SESSION['imapAdmPass'] = lamEncrypt($_POST['ImapAdminPassword']); $client->logout(); }