public function add($password, $name = '', $quota = 0, $active = true, $mail = true ) {
# FIXME: change default value of $quota to something that is not an allowed value, like "-9" (0 is "unlimited", and I don't like that as default)
# FIXME: Should the parameters be optional at all?
# TODO: check if parameters are valid/allowed (quota?). Checks should live in a separate function that can be used by add and edit.
# TODO: On the longer term, the web interface should also use this class.
global $config;
$username = $this->username;
$tmp = preg_split ('/@/', $username);
@ -121,6 +125,7 @@ class UserHandler {
$plain = $password;
$password = pacrypt ($password);
# TODO: Decide if we want to have the encryption method in the encrypted password string, and edit pacrypt() accordingly. No special handling here, please!
if ( preg_match("/^dovecot:/", Config::read('encrypt')) ) {