Send messages to owner, not to user when user is demo.

This commit is contained in:
James Cole
2020-11-03 20:33:46 +01:00
parent 433397cb3d
commit 80ef6fcb04
3 changed files with 15 additions and 0 deletions

View File

@@ -65,6 +65,10 @@ class AutomationHandler
$email = $pref->data;
}
// if user is demo user, send to owner:
if($user->hasRole('demo')) {
$email = config('firefly.site_owner');
}
try {
Log::debug('Trying to mail...');