We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ada04e commit e8506e8Copy full SHA for e8506e8
resources/lib/UnityGroup.php
@@ -73,9 +73,11 @@ public function disable(bool $send_mail = true): void
73
if ($send_mail) {
74
$member_attributes = $this->LDAP->getUsersAttributes($memberuids, ["mail"]);
75
$member_mails = array_map(fn($x) => $x["mail"][0], $member_attributes);
76
- $this->MAILER->sendMail($member_mails, "group_disabled", [
77
- "group_name" => $this->gid,
78
- ]);
+ if (count($member_mails) > 0) {
+ $this->MAILER->sendMail($member_mails, "group_disabled", [
+ "group_name" => $this->gid,
79
+ ]);
80
+ }
81
}
82
$this->setIsDisabled(true);
83
if (count($memberuids) > 0) {
0 commit comments