MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / createUser

Function createUser

apps/web/services/invites.ts:278–303  ·  view source on GitHub ↗
({
  accountId,
  authId,
  displayName,
  profileImageUrl,
}: {
  accountId: string;
  authId: string;
  displayName: string;
  profileImageUrl?: string;
})

Source from the content-addressed store, hash-verified

276}
277
278async function createUser({
279 accountId,
280 authId,
281 displayName,
282 profileImageUrl,
283}: {
284 accountId: string;
285 authId: string;
286 displayName: string;
287 profileImageUrl?: string;
288}) {
289 const user = await prisma.users.create({
290 data: {
291 isAdmin: false,
292 isBot: false,
293 accountsId: accountId,
294 authsId: authId,
295 displayName,
296 anonymousAlias: generateRandomWordSlug(),
297 role: Roles.MEMBER,
298 profileImageUrl,
299 },
300 });
301 await eventUserJoin({ userId: user.id });
302 return user;
303}
304
305async function findUser(accountId: string, authId: string) {
306 return await prisma.users.findFirst({

Callers 2

joinCommunityFunction · 0.70
joinCommunityAfterSignInFunction · 0.70

Calls 3

generateRandomWordSlugFunction · 0.90
eventUserJoinFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected