File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,11 @@ def verify_user_alias(user, token):
85
85
Marks a user's contact point as verified depending on accepted token type.
86
86
"""
87
87
if token .to_alias_type == 'EMAIL' :
88
- setattr (user , api_settings .PASSWORDLESS_USER_EMAIL_VERIFIED_FIELD_NAME , True )
88
+ if token .to_alias == getattr (user , api_settings .PASSWORDLESS_USER_EMAIL_FIELD_NAME ):
89
+ setattr (user , api_settings .PASSWORDLESS_USER_EMAIL_VERIFIED_FIELD_NAME , True )
89
90
elif token .to_alias_type == 'MOBILE' :
90
- setattr (user , api_settings .PASSWORDLESS_USER_MOBILE_VERIFIED_FIELD_NAME , True )
91
+ if token .to_alias == getattr (user , api_settings .PASSWORDLESS_USER_MOBILE_FIELD_NAME ):
92
+ setattr (user , api_settings .PASSWORDLESS_USER_MOBILE_VERIFIED_FIELD_NAME , True )
91
93
else :
92
94
return False
93
95
user .save ()
You can’t perform that action at this time.
0 commit comments