diff --git a/plugins/password/drivers/cpanel.php b/plugins/password/drivers/cpanel.php index 79c895db527..01983b4b046 100644 --- a/plugins/password/drivers/cpanel.php +++ b/plugins/password/drivers/cpanel.php @@ -46,12 +46,12 @@ public function save($curpas, $newpass) $this->xmlapi = new xmlapi($rcmail->config->get('password_cpanel_host')); $this->xmlapi->set_port($rcmail->config->get('password_cpanel_port')); // Hash auth - if (!empty($rcmail->config->get('password_cpanel_hash'))) { - $this->xmlapi->hash_auth( $this->cuser, $rcmail->config->get('password_cpanel_hash')); + if (!empty($cpanel_hash = $rcmail->config->get('password_cpanel_hash'))) { + $this->xmlapi->hash_auth( $this->cuser, $cpanel_hash); } // Pass auth - else if (!empty($rcmail->config->get('password_cpanel_password'))) { - $this->xmlapi->hash_auth( $this->cuser, $rcmail->config->get('password_cpanel_password')); + else if (!empty($cpanel_password = $rcmail->config->get('password_cpanel_password'))) { + $this->xmlapi->hash_auth( $this->cuser, $cpanel_password); } else { return false;