User

Users with access to the Back Office

Field

Type

Required

Default

Description

id

ObjectId

Yes

-

Alias of _id generated by mongo

Number

Yes

0

The level of privilege the user holds.

email

String

Yes

-

User's email address. Registration email to be sent here

password

String

Yes

-

User's password. Stored as hash.

loggedIn

Boolean

Yes

false

Exists to stop unexpired tokens from being used to log in after user has logged out. May still be set true after all token sessions for the user are expired . In this case the user must log in again to obtain a fresh token.

active

Boolean

Yes

false

Whether the user has been deactivated

registered

Boolean

Yes

false

Unique invitation url for inviting Owner and Admin accounts

pwResetToken

String

No

-

The password reset token currently issued to this user

passwordLastChanged

Date

No

-

The date that the password was last modified. Used to invalidate tokens when the password is changed

location

No

-

Reference to the location the user belongs to

Access: {
    // For Admin's Only
    // Which sections can they access (eg. Only Articles)
},

Last updated

Was this helpful?