mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 22:54:37 +02:00
* Validation framework functional
* Use validation for FSE, NUA, etc. * Switch to nua.js from apply.js (MenuModule + validation)
This commit is contained in:
parent
e4cfb2b92e
commit
da5d88d20d
7 changed files with 121 additions and 75 deletions
|
@ -64,22 +64,3 @@ AreaPostFSEModule.prototype.enter = function(client) {
|
|||
|
||||
AreaPostFSEModule.super_.prototype.enter.call(this, client);
|
||||
};
|
||||
|
||||
AreaPostFSEModule.prototype.validateToUserName = function(un, cb) {
|
||||
var self = this;
|
||||
|
||||
if(!un) {
|
||||
cb(new Error('Username must be supplied!'));
|
||||
return;
|
||||
}
|
||||
|
||||
if(!self.isLocalEmail()) {
|
||||
cb(null);
|
||||
return;
|
||||
}
|
||||
|
||||
user.getUserIdAndName(un, function uidAndName(err, userId, userName) {
|
||||
self.toUserId = userId;
|
||||
cb(err);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue