Commit 78a81da4 authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge "Fix warning when registering an account"

parents 7e530034 3cee55f8
......@@ -288,7 +288,7 @@ function email_user($userto, $userfrom, $subject, $messagetext, $messagehtml='',
throw new InvalidArgumentException("empty user given to email_user");
}
if ($userto->id && empty($userto->ignoredisabled)) {
if (isset($userto->id) && empty($userto->ignoredisabled)) {
$maildisabled = property_exists($userto, 'maildisabled') ? $userto->maildisabled : get_account_preference($userto->id, 'maildisabled') == 1;
if ($maildisabled) {
throw new EmailDisabledException("email for this user has been disabled");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment