MCPcopy Create free account
hub / github.com/MemTensor/MemOS / listHubUsers

Method listHubUsers

packages/memos-core/src/storage/sqlite.ts:2179–2188  ·  view source on GitHub ↗
(status?: UserStatus)

Source from the content-addressed store, hash-verified

2177 }
2178
2179 listHubUsers(status?: UserStatus): HubUserRecord[] {
2180 const rows = status
2181 ? this.db.prepare('SELECT * FROM hub_users WHERE status = ? ORDER BY created_at').all(status) as HubUserRow[]
2182 : this.db.prepare('SELECT * FROM hub_users ORDER BY created_at').all() as HubUserRow[];
2183 return rows.map(r => {
2184 const user = rowToHubUser(r);
2185 user.groups = this.getGroupsForHubUser(r.id);
2186 return user;
2187 });
2188 }
2189
2190 deleteHubMemoriesByUser(userId: string): void {
2191 this.db.prepare('DELETE FROM hub_memories WHERE source_user_id = ?').run(userId);

Callers 10

listPendingUsersMethod · 0.45
ensureBootstrapAdminMethod · 0.45
isUsernameTakenMethod · 0.45
stopMethod · 0.45
handleMethod · 0.45
notifyAdminsMethod · 0.45
initOnlineTrackingMethod · 0.45
checkOfflineUsersMethod · 0.45
serveSharingStatusMethod · 0.45
notifyHubShutdownMethod · 0.45

Calls 5

getGroupsForHubUserMethod · 0.95
allMethod · 0.80
prepareMethod · 0.80
mapMethod · 0.80
rowToHubUserFunction · 0.70

Tested by

no test coverage detected