refactoring
This commit is contained in:
parent
59e9635e90
commit
0f8fb1e146
|
@ -354,14 +354,14 @@ class imapAccess extends baseModule {
|
||||||
}
|
}
|
||||||
$prefix = $this->getMailboxPrefix();
|
$prefix = $this->getMailboxPrefix();
|
||||||
|
|
||||||
$user = $this->getAdminUser();
|
$adminUser = $this->getAdminUser();
|
||||||
if (isset($_POST['ImapAdminPassword']) && isset($_POST['enterPasswordButton'])) {
|
if (isset($_POST['ImapAdminPassword']) && isset($_POST['enterPasswordButton'])) {
|
||||||
$errors = $this->doLogin();
|
$errors = $this->doLogin();
|
||||||
}
|
}
|
||||||
$password = $this->getAdminPassword();
|
$adminPassword = $this->getAdminPassword();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$client = $this->connect($user, $password);
|
$client = $this->connect($adminUser, $adminPassword);
|
||||||
$this->extractUserAndEmail();
|
$this->extractUserAndEmail();
|
||||||
$email_domain = substr(strstr($this->email, '@'), 1);
|
$email_domain = substr(strstr($this->email, '@'), 1);
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ class imapAccess extends baseModule {
|
||||||
else {
|
else {
|
||||||
$root = $prefix . $this->getSep() . $this->user;
|
$root = $prefix . $this->getSep() . $this->user;
|
||||||
try {
|
try {
|
||||||
$client->setACL($root, $user, array('rights' => 'c', 'action' => 'add'));
|
$client->setACL($root, $adminUser, array('rights' => 'c', 'action' => 'add'));
|
||||||
$client->deleteMailbox($root);
|
$client->deleteMailbox($root);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in New Issue