Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed-username-taken-issue #24

Open
wants to merge 2 commits into
base: f24
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/src/client/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ define('forum/register', [
} else if (username.length > ajaxify.data.maximumUsernameLength) {
showError(usernameInput, username_notify, '[[error:username-too-long]]');
} else if (!utils.isUserNameValid(username) || !userslug) {
showError(usernameInput, username_notify, '[[error:invalid-username]]');
showError(usernameInput, username_notify, '[[error:username-taken]]');
} else {
Promise.allSettled([
api.head(`/users/bySlug/${userslug}`, {}),
Expand All @@ -135,7 +135,7 @@ define('forum/register', [
if (results.every(obj => obj.status === 'rejected')) {
showSuccess(usernameInput, username_notify, successIcon);
} else {
showError(usernameInput, username_notify, '[[error:username-taken]]');
showError(usernameInput, username_notify, `[[error:username-taken]] Maybe try ${usernameInput.val()}suffix`);
}

callback();
Expand Down