[FIX] Check settings for name requirement before validating#14021
Merged
[FIX] Check settings for name requirement before validating#14021
Conversation
rodrigok
requested changes
Apr 6, 2019
app/lib/server/functions/saveUser.js
Outdated
|
|
||
| // set userData.name to empty string to guarantee it's not undefined | ||
| if (!userData.name) { | ||
| userData.name = ''; |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
and how would you clear the username after it's been set to something?
rodrigok
reviewed
Apr 6, 2019
rodrigok
approved these changes
Apr 6, 2019
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)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.