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

[FIX] Check settings for name requirement before validating #14021

Merged
merged 6 commits into from
Apr 6, 2019

Conversation

marceloschmidt
Copy link
Member

Closes #6081

When "Require Name For Signup" in Admin -> Accounts -> Registration is set to false, allows saving user info without providing a name, and also allows setting it to empty.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-14021 April 6, 2019 14:20 Inactive
@@ -171,6 +171,11 @@ export const saveUser = function(userId, userData) {

const _id = Accounts.createUser(createUser);

// set userData.name to empty string to guarantee it's not undefined
if (!userData.name) {
userData.name = '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? That way if I as admin edit a user that doesn't have a name name === undefined I'll update it to name === '' and all of his subscriptions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and how would you clear the username after it's been set to something?

@marceloschmidt marceloschmidt temporarily deployed to rocket-chat-pr-14021 April 6, 2019 15:40 Inactive
@marceloschmidt marceloschmidt temporarily deployed to rocket-chat-pr-14021 April 6, 2019 17:23 Inactive
@rodrigok rodrigok requested a deployment to rocket-chat-pr-14021 April 6, 2019 18:50 Abandoned
@rodrigok rodrigok self-assigned this Apr 6, 2019
@rodrigok rodrigok requested a deployment to rocket-chat-pr-14021 April 6, 2019 19:09 Abandoned
@rodrigok rodrigok merged commit 3adef03 into develop Apr 6, 2019
@rodrigok rodrigok deleted the allow-empty-username branch April 6, 2019 19:09
wreiske added a commit to wreiske/Rocket.Chat that referenced this pull request Apr 7, 2019
… into emoji-upgrades

* 'emoji-upgrades' of https://github.com/wreiske/Rocket.Chat:
  Settings: disable reset button (RocketChat#14026)
  Settings: hiding  reset button for readonly fields (RocketChat#14025)
  [NEW] Add support to updatedSince parameter in emoji-custom.list and deprecated old endpoint (RocketChat#13510)
  [IMPROVE] Add permission to change other user profile avatar (RocketChat#13884)
  [IMPROVE] UI of Permissions page (RocketChat#13732)
  [NEW] Chatpal: Enable custom search parameters (RocketChat#13828) (RocketChat#13829)
  [FIX] Closing sidebar when room menu is clicked. (RocketChat#13842)
  [FIX] Check settings for name requirement before validating (RocketChat#14021)
  Fix debug logging not being enabled by the setting (RocketChat#13979)
  [FIX] Links and upload paths when running in a subdir (RocketChat#13982)
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants