mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-07 12:03:30 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
"nodebb-plugin-mentions": "~0.1.14",
|
||||
"nodebb-plugin-markdown": "~0.1.8",
|
||||
"nodebb-theme-vanilla": "designcreateplay/nodebb-theme-vanilla",
|
||||
"nodebb-theme-cerulean": "0.0.5",
|
||||
"nodebb-theme-cerulean": "0.0.6",
|
||||
"cron": "~1.0.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
||||
@@ -61,7 +61,7 @@ define(function() {
|
||||
showError(username_notify, 'Username too short!');
|
||||
} else if (username.val().length > config.maximumUsernameLength) {
|
||||
showError(username_notify, 'Username too long!');
|
||||
} else if (!utils.isUserNameValid(username.val())) {
|
||||
} else if (!utils.isUserNameValid(username.val()) || !utils.slugify(username.val())) {
|
||||
showError(username_notify, 'Invalid username!');
|
||||
} else {
|
||||
socket.emit('user.exists', {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="jumbotron {motd_class}">
|
||||
<div class="motd{motd_class}">
|
||||
{motd}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -51,8 +51,10 @@ var user = require('./../user.js'),
|
||||
}
|
||||
|
||||
async.each(data.categories, iterator, function (err) {
|
||||
data.motd_class = (meta.config.show_motd === '1' || meta.config.show_motd === undefined) ? '' : 'none';
|
||||
data.motd = require('marked')(meta.config.motd || "# NodeBB <span>v " + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.\n\n<div class='btn-group'><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"icon-comment\"></i><span class='hidden-mobile'> Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"icon-github-alt\"></i><span class='hidden-mobile'> Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/dcplabs\" class=\"btn btn-default btn-lg\"><i class=\"icon-twitter\"></i><span class='hidden-mobile'> @dcplabs</span></a></div>");
|
||||
data.motd_class = (meta.config.show_motd === '1' || meta.config.show_motd === undefined) ? '' : ' none';
|
||||
data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default');
|
||||
|
||||
data.motd = require('marked')(meta.config.motd || "<div class=\"pull-right btn-group\"><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"icon-comment\"></i><span class='hidden-mobile'> Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"icon-github-alt\"></i><span class='hidden-mobile'> Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/dcplabs\" class=\"btn btn-default btn-lg\"><i class=\"icon-twitter\"></i><span class='hidden-mobile'> @dcplabs</span></a></div>\n\n# NodeBB <span>v" + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.");
|
||||
res.json(data);
|
||||
});
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ var utils = require('./../public/src/utils.js'),
|
||||
}
|
||||
},
|
||||
function(next) {
|
||||
next(!utils.isUserNameValid(username) ? new Error('Invalid Username!') : null);
|
||||
next((!utils.isUserNameValid(username) || !userslug) ? new Error('Invalid Username!') : null);
|
||||
},
|
||||
function(next) {
|
||||
if (password !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user