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

After registration: Mail not shown #1836

Open
1 task done
ebroda opened this issue Sep 10, 2024 · 3 comments
Open
1 task done

After registration: Mail not shown #1836

ebroda opened this issue Sep 10, 2024 · 3 comments
Labels

Comments

@ebroda
Copy link
Contributor

ebroda commented Sep 10, 2024

Description of the issue

I registered in the OpenEnergyPlatform and afterwards got the following message, with my E-Mail-Adress missing. But still the activation mail was send correctly.

oep_mail

Feels like, user.email, is not set correctly.

Your activation mail was sent to <b>{{user.email}}</b>. If this is not the correct address,

Steps to Reproduce

  1. Register at openenergyplatform.org
  2. See message without mail.

Ideas of solution

  • Check if user.email is set and available on showing the message. If not, check why.

Context and Environment

  • Version used: current one at openenergyplatform.org
  • Operating system: -
  • Environment setup and (python) version: -

Workflow checklist

@ebroda ebroda added the bug label Sep 10, 2024
@jh-RLI
Copy link
Contributor

jh-RLI commented Sep 16, 2024

Hm, that's strange. I'll check that again, at least it worked until a few weeks ago.

Edit - nope wasnt working before ... that is what you get if tests are missing :O

@jh-RLI
Copy link
Contributor

jh-RLI commented Sep 16, 2024

The email field is filled in at this point, but a redirect is made to the page shown above. During the redirect the context of the user creation form is lost and therefore at this point it is not really possible to transfer the available data about the new user to the form as there is no information and no token available yet (as the user has to click on the link in the activation email first) with which to determine the current user. Well, I don't like this implementation at all, but I think for now I'll just somehow include the user data as context in the view. I will probably have to change the implementation though.

return redirect("activate")

@ebroda
Copy link
Contributor Author

ebroda commented Sep 17, 2024

Okay, sound's not to good.
Maybe a temporary setting to the session could do that? Like including it in the register-process (only the email) and then get and remove it here (probably something like https://docs.djangoproject.com/en/5.1/topics/http/sessions/#examples).

But to continue that:
Does the form below to change the email work correctly, if we have no token and no user? So how does the OEP know to which user it should assign the given e-mail address and resend the mail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants