MCPcopy Create free account
hub / github.com/firebase/quickstart-js / writeUserData

Function writeUserData

database/scripts/main.ts:503–514  ·  view source on GitHub ↗

* Writes the user's data to the database.

(
  userId: string,
  name: string | null,
  email: string | null,
  imageUrl: string | null,
)

Source from the content-addressed store, hash-verified

501 * Writes the user's data to the database.
502 */
503function writeUserData(
504 userId: string,
505 name: string | null,
506 email: string | null,
507 imageUrl: string | null,
508) {
509 set(ref(database, 'users/' + userId), {
510 username: name,
511 email: email,
512 profile_picture: imageUrl,
513 });
514}
515
516/**
517 * Cleanups the UI and removes all Firebase listeners.

Callers 1

onAuthChangedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected