Merge pull request #9 from gjedeer/master

Virtualmin plugin updated for current setups
pull/7/merge
Aleksander Machniak 13 years ago
commit 2d1709a37b

@ -308,7 +308,8 @@ $rcmail_config['hmailserver_server'] = array(
// 5: domain-username
// 6: username_domain
// 7: domain_username
$rcmail_config['password_virtualmin_format'] = 0;
// 8: username@domain; mbox.username
$rcmail_config['password_virtualmin_format'] = 8;
// pw_usermod Driver options

@ -48,6 +48,10 @@ class rcube_virtualmin_password
$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);
}

Loading…
Cancel
Save