Aleksander Machniak
2013-10-17 037af6890fe6fdb84a08d3c86083e847c90ec0ad
plugins/password/drivers/virtualmin.php
@@ -48,6 +48,10 @@
            $pieces = explode("_", $username);
            $domain = $pieces[0];
            break;
        case 8: // domain taken from alias, username left as it was
            $email = $rcmail->user->data['alias'];
            $domain = substr(strrchr($email, "@"), 1);
            break;
        default: // username@domain
            $domain = substr(strrchr($username, "@"), 1);
        }
@@ -55,7 +59,7 @@
        $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);