Make real name and other properties optional - pass 1

This commit is contained in:
Bryan Ashby
2023-07-24 12:17:47 -06:00
parent 77160434e6
commit f99de19792
10 changed files with 30 additions and 39 deletions

View File

@@ -13,6 +13,7 @@ const UserProps = require('./user_property.js');
// deps
const _ = require('lodash');
const moment = require('moment');
exports.moduleInfo = {
name: 'NUA',
@@ -95,15 +96,15 @@ exports.getModule = class NewUserAppModule extends MenuModule {
areaTag = areaTag || '';
newUser.properties = {
[UserProps.RealName]: formData.value.realName,
[UserProps.RealName]: formData.value.realName || '',
[UserProps.Birthdate]: getISOTimestampString(
formData.value.birthdate
formData.value.birthdate || moment()
),
[UserProps.Sex]: formData.value.sex,
[UserProps.Location]: formData.value.location,
[UserProps.Affiliations]: formData.value.affils,
[UserProps.EmailAddress]: formData.value.email,
[UserProps.WebAddress]: formData.value.web,
[UserProps.Sex]: formData.value.sex || '',
[UserProps.Location]: formData.value.location || '',
[UserProps.Affiliations]: formData.value.affils || '',
[UserProps.EmailAddress]: formData.value.email || '',
[UserProps.WebAddress]: formData.value.web || '',
[UserProps.AccountCreated]: getISOTimestampString(),
[UserProps.MessageConfTag]: confTag,