mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-17 21:12:50 +01:00
fix: #11837, use userslug for check
This commit is contained in:
@@ -124,7 +124,7 @@ define('forum/register', [
|
|||||||
showError(username_notify, '[[error:invalid-username]]');
|
showError(username_notify, '[[error:invalid-username]]');
|
||||||
} else {
|
} else {
|
||||||
Promise.allSettled([
|
Promise.allSettled([
|
||||||
api.head(`/users/bySlug/${username}`, {}),
|
api.head(`/users/bySlug/${userslug}`, {}),
|
||||||
api.head(`/groups/${username}`, {}),
|
api.head(`/groups/${username}`, {}),
|
||||||
]).then((results) => {
|
]).then((results) => {
|
||||||
if (results.every(obj => obj.status === 'rejected')) {
|
if (results.every(obj => obj.status === 'rejected')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user