|  | @@ -59,28 +59,6 @@ class LuticateGroupsDataAccess extends LuDataAccess {
 | 
		
	
		
			
			| 59 | 59 |          return new LuMultipleDbo($count, $usersLight);
 | 
		
	
		
			
			| 60 | 60 |      }
 | 
		
	
		
			
			| 61 | 61 |  
 | 
		
	
		
			
			| 62 |  | -    public static function getOtherUsers($group_id, $page = 0, $perPage = PHP_INT_MAX, $query = "")
 | 
		
	
		
			
			| 63 |  | -    {
 | 
		
	
		
			
			| 64 |  | -        $model = LuticateUsers::where("luticate_users_groups.id", "IS", "NULL")
 | 
		
	
		
			
			| 65 |  | -            ->leftJoin("luticate_users_groups", function($join) use ($group_id)
 | 
		
	
		
			
			| 66 |  | -            {
 | 
		
	
		
			
			| 67 |  | -                $join->on("luticate_users.id", "=", "luticate_users_groups.user_id")
 | 
		
	
		
			
			| 68 |  | -                ->on("luticate_users_groups.group_id", "=", $group_id);
 | 
		
	
		
			
			| 69 |  | -            });
 | 
		
	
		
			
			| 70 |  | -
 | 
		
	
		
			
			| 71 |  | -        $count = $model->count();
 | 
		
	
		
			
			| 72 |  | -
 | 
		
	
		
			
			| 73 |  | -        $model = $model->orderBy("luticate_users.username", "ASC");
 | 
		
	
		
			
			| 74 |  | -        $data = $model->take($perPage)->offset($page * $perPage)->get();
 | 
		
	
		
			
			| 75 |  | -        $usersLight = [];
 | 
		
	
		
			
			| 76 |  | -        foreach ($data as $user) {
 | 
		
	
		
			
			| 77 |  | -            if (!is_null($user)) {
 | 
		
	
		
			
			| 78 |  | -                $usersLight[] = LuticateUsersLightDbo::fromUserDbo($user->toDbo());
 | 
		
	
		
			
			| 79 |  | -            }
 | 
		
	
		
			
			| 80 |  | -        }
 | 
		
	
		
			
			| 81 |  | -        return new LuMultipleDbo($count, $usersLight);
 | 
		
	
		
			
			| 82 |  | -    }
 | 
		
	
		
			
			| 83 |  | -
 | 
		
	
		
			
			| 84 | 62 |      public static function addUser($user_id, $group_id)
 | 
		
	
		
			
			| 85 | 63 |      {
 | 
		
	
		
			
			| 86 | 64 |          LuticateGroups::find($group_id)->users()->attach($user_id);
 |