Hey there,

So I added a unique field (Telephone number) to the user fields, so that they can login with their phone number and all.

The thing is, since that field should be unique, I get an error whenever I want to even edit the user (maybe to change the role or some other info besides the phone field), so practically it's impossible to edit the form when the field is available and it's unique

Comments

doxigo created an issue. See original summary.

awolfey’s picture

Status: Active » Needs review
StatusFileSize
new924 bytes

Here's a patch to fix this issue. It works by checking that the matching phone number belongs to the user submitting the form.

awolfey’s picture

StatusFileSize
new1.23 KB

Whoops, left something out.

awolfey’s picture

StatusFileSize
new1.23 KB

Last one.

geoanders’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev

  • geoanders committed 34dae3f on 8.x-2.x
    Issue #2979037 - Fix validation when editing an existing user.
    

  • geoanders committed 218a48c on 8.x-2.x
    Issue #2979037 - Exclude user loaded on user form from duplicate lookup.
    
geoanders’s picture

Status: Needs review » Fixed

Changed it up a bit to essentially exclude current or loaded user on form from duplicate lookup.

Now fixed in latest branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.