]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/UserRepo.php
Added page titles to many missing app areas
[bookstack] / app / Auth / UserRepo.php
index ce982d4710df66d8e5c9c253aae4c19727e14aaf..ff2e91ee23a8ad8c7b3dfdee003ff741a04db1a4 100644 (file)
@@ -62,13 +62,16 @@ class UserRepo
 
     /**
      * Get all the users with their permissions in a paginated format.
+     * Note: Due to the use of email search this should only be used when
+     * user is assumed to be trusted. (Admin users).
+     * Email search can be abused to extract email addresses.
      */
     public function getAllUsersPaginatedAndSorted(int $count, array $sortData): LengthAwarePaginator
     {
         $sort = $sortData['sort'];
 
         $query = User::query()->select(['*'])
-            ->withLastActivityAt()
+            ->scopes(['withLastActivityAt'])
             ->with(['roles', 'avatar'])
             ->withCount('mfaValues')
             ->orderBy($sort, $sortData['order']);