Thomas Bruederli
2014-06-04 3412e50b54e3daac8745234e21ab6e72be0ed165
plugins/password/drivers/virtualmin.php
@@ -18,8 +18,7 @@
{
    function save($currpass, $newpass)
    {
        $rcmail = rcmail::get_instance();
        $rcmail   = rcmail::get_instance();
        $format   = $rcmail->config->get('password_virtualmin_format', 0);
        $username = $_SESSION['username'];
@@ -52,10 +51,14 @@
            $domain = substr(strrchr($username, "@"), 1);
        }
        if (!$domain) {
            $domain = $rcmail->user->get_username('domain');
        }
        $username = escapeshellcmd($username);
        $domain   = escapeshellcmd($domain);
        $newpass  = escapeshellcmd($newpass);
        $curdir   = INSTALL_PATH . 'plugins/password/helpers';
        $curdir   = RCUBE_PLUGINS_DIR . 'password/helpers';
        exec("$curdir/chgvirtualminpasswd modify-user --domain $domain --user $username --pass $newpass", $output, $returnvalue);
@@ -63,7 +66,7 @@
            return PASSWORD_SUCCESS;
        }
        else {
            raise_error(array(
            rcube::raise_error(array(
                'code' => 600,
                'type' => 'php',
                'file' => __FILE__, 'line' => __LINE__,