* New @systemMethod

This commit is contained in:
Bryan Ashby 2015-04-20 23:24:15 -06:00
parent ec5f1836c5
commit 5ab89f952f
7 changed files with 99 additions and 41 deletions

View file

@ -87,13 +87,18 @@ function submitApplication(callingMenu, formData, extraArgs) {
email_address : formData.value.email,
web_address : formData.value.web,
theme_id : Config.defaults.theme, // :TODO: allow '*' = random
account_status : Config.users.requireActivation ? user.User.AccountStatus.inactive : user.User.AccountStatus.active,
// :TODO: Other defaults
// :TODO: should probably have a place to create defaults/etc.
};
if('*' === Config.defaults.theme) {
newUser.properties.theme_id = theme.getRandomTheme();
} else {
newUser.properties.theme_id = Config.defaults.theme;
}
newUser.create( { password : formData.value.password }, function created(err) {
if(err) {
client.gotoMenuModule( { name : extraArgs.error } );

View file

@ -71,7 +71,7 @@
"prompt" : "userCredentials",
"fallback" : "matrix",
"next" : "newUserActive",
"action" : "@method:general_menu_methods/login",
"action" : "@systemMethod:login",
// :TODO: support alt submit method for prompts
// if present, standard filters apply. No need for multiple submit ID's
@ -90,7 +90,7 @@
"logoff" : {
"art" : "LOGOFF",
//"module" : "logoff",
"action" : "@method:general_menu_methods/logoff",
"action" : "@systemMethod:logoff",
"options" : { "cls" : true }
},
"apply" : {