Added moderator addition to db#133
Open
singhsanket143 wants to merge 8 commits intoberkmancenter:devfrom
Open
Conversation
peter-hank
reviewed
Aug 19, 2019
peter-hank
requested changes
Aug 19, 2019
server/methods.js
Outdated
| name: item.slice(0, item.indexOf('@')) | ||
| } | ||
| }); | ||
| await Accounts.forgotPassword({email: item}, (err) => { |
Contributor
There was a problem hiding this comment.
@singhsanket143 MAIL_ID_FROM is not set here for some reason
Contributor
Author
There was a problem hiding this comment.
@peter-hank According to me in Accounts.forgotPassword only the target email whose password is supposed to be reset is passed, the MAIL_ID_FROM will be preconfigured from the code and session variables.
Contributor
There was a problem hiding this comment.
@singhsanket143 unfortunately, it doesn't work, it doesn't use the MAIL_ID_FROM variable in this case
Contributor
Author
There was a problem hiding this comment.
@peter-hank I have updated the code to rectify this issue.
…into Feature_Add_Moderator
…into Feature_Add_Moderator
peter-hank
reviewed
Aug 22, 2019
peter-hank
reviewed
Aug 22, 2019
18c4e1e to
4167cce
Compare
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.
The pull request is implementation for the feature listed in issue #16612.
If a user's email is not in the DB that is fine. Rather than throwing the error telling the creator to go tell the mod to sign up for an account and they will be added.
The process is as follows:
Enter an email address -> if the email is in DB perfect add them to the instance, else create an account for that user with the provided email address --> once the account is created send that user a welcome message & trigger password reset.