Change e-mail from auth profile

46 views
Skip to first unread message

André Kablukow

unread,
Apr 3, 2024, 2:55:42 PM4/3/24
to py4web
Hi Srs.

How can I change the e-mail in auth/profile?

Tried to use "change_email" parameter on allowed_actions but it does not work.
Also tried "exclude_extra_fields_in_profile" and nothing.

Thank you very much.

André Kablukow

unread,
Apr 3, 2024, 3:25:08 PM4/3/24
to py4web
 If I change auth method  to use username it allows me to update. But I need to use e-mail as login method and be able to change it in profile update.

pe...@anewalt.com

unread,
Aug 28, 2025, 6:26:35 PM (10 days ago) Aug 28
to py4web
This is an old thread, but I am having this problem as well.  Trying to allow the user to change the email address on their user account.  Relevant settings:
auth.use_username=False
settings.ALLOWED_ACTIONS=['all']
auth.param.allowed_actions=settings.ALLOWED_ACTIONS

From the docs, it looks like there should be an action at auth/change_email, but when I try to visit auth/change_email I get 404 not found.  Anyone know what I might be doing wrong?

Thanks in advance,

pe...@anewalt.com

unread,
Sep 1, 2025, 10:31:31 AM (6 days ago) Sep 1
to py4web
For anyone else who may be interested, it looks like change_email is an auth API function with no corresponding auth UI page.  The docs are fuzzy on all this, but looking at the code in auth.py, the API function is straightforward.  It assumes a password will be collected to verify the person making the change is authorized to do so, and then changes the value in auth_user.  I didn't bother with the API & instead built my own controller to collect email, twice, and collect & verify the password before making the change.  

Massimo DiPierro

unread,
Sep 1, 2025, 12:19:58 PM (6 days ago) Sep 1
to py4web
We could add that missing UI page although changing emails can have unwanted consequences.
Imagine a person using the account to sign a contract online after verifying the email and then changing the email to another one. You lose info about the email used to sign the contract.
Also the new email would need to be verified and the process for that does not exist.
Anyway, I see the value in making this work I am just not completely sure about the best way to do it.


Reply all
Reply to author
Forward
0 new messages