Fallback to current user when triggering activities
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -240,6 +240,9 @@ class ActivityManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function triggerEvent($objectType, $entity, $subject, $additionalParams = [], $author = null) {
|
public function triggerEvent($objectType, $entity, $subject, $additionalParams = [], $author = null) {
|
||||||
|
if ($author === null) {
|
||||||
|
$author = $this->userId;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$event = $this->createEvent($objectType, $entity, $subject, $additionalParams, $author);
|
$event = $this->createEvent($objectType, $entity, $subject, $additionalParams, $author);
|
||||||
if ($event !== null) {
|
if ($event !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user