mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 00:15:00 -04:00
Fix #916
This commit is contained in:
parent
8a42521cd0
commit
a37c45e8b0
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,6 @@ UserSchema.pre('init', (next) ->
|
||||||
for prop, sch of jsonschema.properties
|
for prop, sch of jsonschema.properties
|
||||||
continue if prop is 'emails' # defaults may change, so don't carry them over just yet
|
continue if prop is 'emails' # defaults may change, so don't carry them over just yet
|
||||||
@set(prop, sch.default) if sch.default?
|
@set(prop, sch.default) if sch.default?
|
||||||
@set('permissions', ['admin']) if not isProduction
|
|
||||||
next()
|
next()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -108,6 +107,7 @@ UserSchema.pre('save', (next) ->
|
||||||
@set('password', undefined)
|
@set('password', undefined)
|
||||||
if @get('email') and @get('anonymous')
|
if @get('email') and @get('anonymous')
|
||||||
@set('anonymous', false)
|
@set('anonymous', false)
|
||||||
|
@set('permissions', ['admin']) if not isProduction
|
||||||
data =
|
data =
|
||||||
email_id: sendwithus.templates.welcome_email
|
email_id: sendwithus.templates.welcome_email
|
||||||
recipient:
|
recipient:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue