refactoring

This commit is contained in:
Roland Gruber 2020-02-15 21:43:08 +01:00
parent 59e9635e90
commit 0f8fb1e146
1 changed files with 4 additions and 4 deletions

View File

@ -354,14 +354,14 @@ class imapAccess extends baseModule {
}
$prefix = $this->getMailboxPrefix();
$user = $this->getAdminUser();
$adminUser = $this->getAdminUser();
if (isset($_POST['ImapAdminPassword']) && isset($_POST['enterPasswordButton'])) {
$errors = $this->doLogin();
}
$password = $this->getAdminPassword();
$adminPassword = $this->getAdminPassword();
try {
$client = $this->connect($user, $password);
$client = $this->connect($adminUser, $adminPassword);
$this->extractUserAndEmail();
$email_domain = substr(strstr($this->email, '@'), 1);
@ -372,7 +372,7 @@ class imapAccess extends baseModule {
else {
$root = $prefix . $this->getSep() . $this->user;
try {
$client->setACL($root, $user, array('rights' => 'c', 'action' => 'add'));
$client->setACL($root, $adminUser, array('rights' => 'c', 'action' => 'add'));
$client->deleteMailbox($root);
}
catch (Exception $e) {