MCPcopy Create free account
hub / github.com/codecombat/codecombat / isRegisteredForAILeague

Method isRegisteredForAILeague

app/models/User.js:1277–1284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1275 age () { return utils.yearsSinceMonth(this.get('birthday')) }
1276
1277 isRegisteredForAILeague () {
1278 // TODO: This logic could use some thinking about, and maybe an explicit field for when we want to be sure they have registered on purpose instead of happening to have these properties.
1279 if (!this.get('birthday')) { return false }
1280 if (!this.get('email')) { return false }
1281 if (this.get('unsubscribedFromMarketingEmails')) { return false }
1282 if (!this.get('emails')?.generalNews?.enabled) { return false }
1283 return true
1284 }
1285
1286 shouldShowLevelAIChat () {
1287 if (utils.isOzaria) {

Callers 2

aiLeagueTilesMethod · 0.80

Calls 1

getMethod · 0.95

Tested by

no test coverage detected