MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / initUser

Function initUser

source code/utils/user.ts:55–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 * This pre-fetches the email so getUser() can remain synchronous.
54 */
55export async function initUser(): Promise<void> {
56 if (cachedEmail === null && !emailFetchPromise) {
57 emailFetchPromise = getEmailAsync()
58 cachedEmail = await emailFetchPromise
59 emailFetchPromise = null
60 // Clear memoization cache so next call picks up the email
61 getCoreUserData.cache.clear?.()
62 }
63}
64
65/**
66 * Reset all user data caches. Call on auth changes (login/logout/account switch)

Callers 1

startDeferredPrefetchesFunction · 0.85

Calls 2

getEmailAsyncFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected