MCPcopy Create free account
hub / github.com/PostHog/posthog / createUser

Function createUser

plugin-server/functional_tests/api.ts:219–233  ·  view source on GitHub ↗
(pgClient: Pool, teamId: number, email: string)

Source from the content-addressed store, hash-verified

217}
218
219export const createUser = async (pgClient: Pool, teamId: number, email: string) => {
220 return await insertRow(pgClient, 'posthog_user', {
221 password: 'abc',
222 email,
223 first_name: '',
224 last_name: '',
225 email_opt_in: false,
226 distinct_id: email,
227 is_staff: false,
228 is_active: true,
229 date_joined: new Date().toISOString(),
230 events_column_config: '{}',
231 uuid: new UUIDT().toString(),
232 })
233}
234
235export const getPropertyDefinitions = async (pgClient: Pool, teamId: number) => {
236 const { rows } = await pgClient.query(`SELECT * FROM posthog_propertydefinition WHERE team_id = $1`, [teamId])

Callers 1

webhooks.test.tsFile · 0.90

Calls 2

insertRowFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…