File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1717use App \Models \Consumable ;
1818use App \Models \LicenseSeat ;
1919use App \Models \Setting ;
20+ use App \Models \User ;
2021use App \Notifications \CheckinAccessoryNotification ;
2122use App \Notifications \CheckinAssetNotification ;
2223use App \Notifications \CheckinLicenseSeatNotification ;
@@ -64,13 +65,14 @@ public function onCheckedOut($event)
6465 * 2. The item has a EULA
6566 * 3. The item should send an email at check-in/check-out
6667 */
67-
68+ if ( $ notifiable instanceof User && $ notifiable -> email != '' ) {
6869 if ($ event ->checkoutable ->requireAcceptance () || $ event ->checkoutable ->getEula () ||
6970 (method_exists ($ event ->checkoutable , 'checkin_email ' ) && $ event ->checkoutable ->checkin_email ())) {
7071
7172 Mail::to ($ notifiable )->send ($ mailable );
72- Log::info ('Sending email, Locale: ' .($ event ->checkedOutTo ->locale ?? 'default ' ));
73+ Log::info ('Sending email, Locale: ' . ($ event ->checkedOutTo ->locale ?? 'default ' ));
7374 }
75+ }
7476
7577// Send Webhook notification
7678 if ($ this ->shouldSendWebhookNotification ()) {
You can’t perform that action at this time.
0 commit comments