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: email digest user not found #23949

Merged

Conversation

pateljannat
Copy link
Contributor

@pateljannat pateljannat commented Nov 18, 2020

Issue:

  1. In an Email Digest, after clicking Send Now, the whole site used to become inaccessible and an error used to appear.

user not found

  1. This used to happen because on clicking Send Now, the code was setting the recipient of email as the session user, send the email, and then reset the original user as session user.
  2. For all this frappe.set_user function was used and this function clears the session after the user gets set. Hence the error.

Fix: Not changing the session user before sending the email.

@pateljannat
Copy link
Contributor Author

closes #21337

@rohitwaghchaure rohitwaghchaure merged commit 6e974bf into frappe:develop Nov 18, 2020
@dawoodjee
Copy link
Contributor

dawoodjee commented Dec 13, 2021

If we cannot use frappe.set_user() what's the right way to set permissions for a guest user's initiated action that inserts a record like Payment Entry for example?

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.

3 participants