$result = db_query("SELECT password FROM $table_mailbox WHERE username='$username' AND active='$active'");
$result = db_assoc($result['result']);
if (pacrypt($old_password, $result['password']) != $result['password']) {
db_log ('CONSOLE', $domain, 'edit_password', "MATCH FAILURE: " . $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
db_log ('CONSOLE', $domain, 'edit_password', "MATCH FAILURE: " . $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
$this->errormsg[] = 'Passwords do not match'; # TODO: make translatable
return false;
}
@ -98,6 +98,7 @@ class UserHandler {
*/
public function add($password, $name = '', $quota = -999, $active = true, $mail = true ) {
# FIXME: default value of $quota (-999) is intentionally invalid. Add fallback to default quota.
# Solution: Invent an sub config class with additional informations about domain based configs like default qouta.
# FIXME: Should the parameters be optional at all?
# TODO: check if parameters are valid/allowed (quota?).
# TODO: most code should live in a separate function that can be used by add and edit.