this check is not necessary, you could replace 

```
                if ($user->get_id() !== $currentUsr) {
                    $currentUsr = $user->get_id();
                    $table['user'][$user->get_id()] = $user;
                }
```

by 


```
                    $table['user'][$user->get_id()] = $user;
```

and remove the use of `$currentUsr`