* ButtonView is now MCI BT. BN is pre-defined "Board Name"

* Client current theme info loaded & used for e.g. passwordChar
* Code cleanup
This commit is contained in:
Bryan Ashby 2015-04-15 22:46:45 -06:00
parent 5eee568586
commit 586f3d60b3
16 changed files with 169 additions and 114 deletions

View file

@ -56,6 +56,8 @@ function ApplyModule(menuConfig) {
affiliation : args.affils,
email_address : args.email,
web_address : args.web,
art_theme_id : Config.users.defaultTheme, // :TODO: allow '*' = random
account_status : user.User.AccountStatus.inactive,
// :TODO: Other defaults
// :TODO: should probably have a place to create defaults/etc.
@ -64,9 +66,15 @@ function ApplyModule(menuConfig) {
newUser.create({ password : args.pw }, function created(err) {
if(err) {
console.log(err)
self.client.gotoMenuModule( { name : args.next.error } );
} else {
Log.info( { username : args.username, userId : newUser.userId }, 'New user created');
if(user.User.AccountStatus.inactive === self.client.user.properties.account_status) {
self.client.gotoMenuModule( { name : args.next.inactive } );
} else {
self.client.gotoMenuModule( { name : args.next.active } );
}
}
});
}