Password plugin made compatible with modern Virtualmin

Added a new username format in Virtualmin driver,
which works for default Virtualmin settings where
username is user.postfix and domain is taken from
email address.

Example:
email - info@goodcoffee.com
login - info.goodcof
pull/23/merge
GDR\! 13 years ago committed by Aleksander Machniak
parent f9db233b97
commit a0f006748f

@ -48,6 +48,10 @@ class rcube_virtualmin_password
$pieces = explode("_", $username); $pieces = explode("_", $username);
$domain = $pieces[0]; $domain = $pieces[0];
break; 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 default: // username@domain
$domain = substr(strrchr($username, "@"), 1); $domain = substr(strrchr($username, "@"), 1);
} }

Loading…
Cancel
Save