File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
use Minds \Core ;
5
5
use Minds \Core \Security ;
6
6
use Minds \Core \Di \Di ;
7
+ use Minds \Core \EntitiesBuilder ;
7
8
use Minds \Core \Events ;
8
9
use Minds \Core \Subscriptions \Manager ;
9
10
use Minds \Entities \User ;
@@ -74,7 +75,7 @@ public static function registerEvents()
74
75
Events \Dispatcher::register ('subscription:dispatch ' , 'all ' , function (Events \Event $ event ) {
75
76
$ params = $ event ->getParameters ();
76
77
77
- $ currentUser = new User ($ params ['currentUser ' ]);
78
+ $ currentUser = Di:: _ ()-> get (EntitiesBuilder::class)-> single ($ params ['currentUser ' ]);
78
79
$ guids = $ params ['guids ' ];
79
80
80
81
if (!is_array ($ guids )) {
@@ -90,7 +91,7 @@ public static function registerEvents()
90
91
91
92
foreach ($ guids as $ guid ) {
92
93
try {
93
- $ target = new User ($ guid );
94
+ $ target = Di:: _ ()-> get (EntitiesBuilder::class)-> single ($ guid );
94
95
95
96
if (!($ target instanceof User) || !$ target ->guid ) {
96
97
$ results [] = [
You can’t perform that action at this time.
0 commit comments