Fixing missing policy for autocreated user when parent domain has none. Patch was send by gfa.
This commit is contained in:
@@ -824,7 +824,18 @@ class DBEngine {
|
||||
/*
|
||||
2. Insert new user
|
||||
*/
|
||||
if($policy == NULL) {
|
||||
if($conf['app']['use_sql_defaults']) {
|
||||
$query = 'insert into users (email, fullname) values ( ?, "mailzu autocreated user")';
|
||||
$policy = array($recip_email);
|
||||
} else {
|
||||
CmnFns::do_error_box('Domain policy not set' //should be translated
|
||||
.'<br />' . '<a href="javascript: history.back();">'
|
||||
.translate('Back') . '</a>');
|
||||
}
|
||||
} else {
|
||||
$query = 'insert into users (priority, policy_id, email, fullname, local) values (?, ?, ?, "mailzu autocreated user", ?);';
|
||||
}
|
||||
$q = $this->db->prepare($query);
|
||||
$result = $this->db->execute($q, $policy);
|
||||
$this->check_for_error($result, $query);
|
||||
|
||||
Reference in New Issue
Block a user