mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-22 15:11:47 +02:00
Merge commit '8482a54a68396333e0b14a792a8c96720a97b59c' into v1.14.x
This commit is contained in:
@@ -188,15 +188,18 @@ define('forum/search', ['search', 'autocomplete', 'storage'], function (searchMo
|
||||
confirmKeys: [13, 44],
|
||||
trimValue: true,
|
||||
});
|
||||
autocomplete.user(userEl.siblings('.bootstrap-tagsinput').find('input'));
|
||||
if (app.user.privileges['search:users']) {
|
||||
autocomplete.user(userEl.siblings('.bootstrap-tagsinput').find('input'));
|
||||
}
|
||||
|
||||
var tagEl = $('#has-tags');
|
||||
tagEl.tagsinput({
|
||||
confirmKeys: [13, 44],
|
||||
trimValue: true,
|
||||
});
|
||||
|
||||
autocomplete.tag(tagEl.siblings('.bootstrap-tagsinput').find('input'));
|
||||
if (app.user.privileges['search:tags']) {
|
||||
autocomplete.tag(tagEl.siblings('.bootstrap-tagsinput').find('input'));
|
||||
}
|
||||
}
|
||||
|
||||
return Search;
|
||||
|
||||
@@ -162,7 +162,7 @@ module.exports = function (SocketUser) {
|
||||
throw new Error('[[error:invalid-uid]]');
|
||||
}
|
||||
|
||||
if (!data || !data.uid) {
|
||||
if (!data || !(parseInt(data.uid, 10) > 0)) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user