Ticket #10363 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Can not edit personal information when one is loged in with email address.

Reported by: papago Owned by: maurits
Priority: major Milestone: 4.0
Component: General Version:
Keywords: personal information Cc: daftdog


Conditions: Setting a plone site with using E-mail as log in name. Then log in to the plone site with email address and password.

Action: Trying to edit personal information or upload picture at @@personal-information page.

Result: I will get error message as follows.

E-mail   (Required)
The email address you selected is already in use or is not valid as login name. Please choose another.

Change History

comment:1 Changed 6 years ago by terapyon

(In [35489]) Hide email field in personal information page when one is loged in with email address. refs #10363

comment:2 Changed 6 years ago by terapyon

(In [35490]) modify CHANGES.txt refs #10363

comment:3 Changed 6 years ago by davisagli

I think the correct solution to this would be to make it so that this message doesn't appear if the e-mail address was not changed, rather than hiding the field entirely. We still want users to be able to edit their e-mail address, even if that's what they're using to log in.

comment:4 Changed 6 years ago by papago

Changing email address here will be the same as changing login ID. Since plone dose not have a mechanism for changing user ID, we have to come up with a new way of handling login ID and changing it.

Do you have any idea how to do it?

Unless we will come up with a new ID handling mechanism, if one changes email address, there will be two different email addresses. ie: "login email address" and "notice mailing email address"

Thaks for your comment :)

comment:5 Changed 6 years ago by davisagli

The user preferences form is supposed to update the user's login ID to the new e-mail address, if the user edits the e-mail address. (It also, separately, should set the user's e-mail property.) I'm not sure if it does that now that it's been refactored to use formlib, but it should. It was working this way as implemented in PLIP 9214.

Yes, it does lead to a minor confusion after you change, since the user ID is not updated (since it cannot easily be updated, as you noted) and will equal the old e-mail address. However, the confusion should be minimal, since we are displaying full name rather than user ID almost everywhere now. The only place we should be using the actual user ID is for keeping track of things like creators and role assignment internally. So I don't think this problem warrants making it impossible for the user to update their e-mail address.

The real solution to this problem is probably a switch to using numeric user IDs, which would be a much more involved change and require a separate PLIP.

comment:6 Changed 6 years ago by papago

OK, now I understand what is going on. I had confused about two different IDs (UserID & LoginID). I thought they are about the same in the way we are using it. But in this case, we have to handle them as separate IDs.

Moreover, I did logged in to my Plone site after I have changed my email account. However as you said, @@usergroup-userprefs, and etc shows an old email address(original mail address).

I accept your comments and have asked terapyon to revert the code. And, ask him to fix this problem with the way you wrote.

Thank you :)

comment:7 Changed 6 years ago by davisagli

(In [35660]) revert r35489 and r35490, which broke a test in CMFPlone. refs #10363; I think a better fix would be to fix the validator for the e-mail field, so that it doesn't fail if the e-mail is a duplicate because it hasn't been changed

comment:8 Changed 6 years ago by DaftDog

  • Cc daftdog added

As stated in #9214 there are other issues when using the email ad as login. When activating member folder creation, the path of the member folder will reveal the email address of the user (with the @ showing up as -40). IMO, the user id should NOT be touched when login by email is enabled. It is used for ownership and as part of the member folders's URL and should simply never change. Email ads are very transient and should not be used for important stuff like that. Using email for login is good and convenient, but for internal use the getId method should always return a separate, non-changeable id. As I see it, this is not the case with the current implementation, the email ad is used as the id, and that's not the way to go IMHO.

comment:9 Changed 6 years ago by esteele

  • Component changed from Unknown to Infrastructure

comment:10 Changed 6 years ago by maurits

  • Owner set to maurits

When the email address is used for logging in, and you change your email address, then the login name is changed as well. The user id stays untouched. This is how it worked after I merged plip 9214 (emaillogin). If this does not work currently, then this is a regression.

I'll have a look.

comment:11 Changed 6 years ago by maurits

  • Status changed from new to closed
  • Resolution set to fixed

(In [36682]) Fixed error when editing your personal information when using the email address as login. Fixes #10363

comment:12 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.