mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 12:26:10 +02:00
✨ Add better email cleaning mechanism
This commit separates the email cleaning mechanism to a separated function, and enables a proper cleaning of `mailto:` prefix, usually found on invitations because users just copy and paste from external source.
This commit is contained in:
parent
040b336ef9
commit
d2626ead0b
8 changed files with 57 additions and 35 deletions
|
@ -347,7 +347,10 @@
|
|||
:code :missing-force
|
||||
:hint "missing force checkbox"))
|
||||
|
||||
(let [profile (some->> params :email (profile/get-profile-by-email pool))]
|
||||
(let [profile (some->> params
|
||||
:email
|
||||
(profile/clean-email)
|
||||
(profile/get-profile-by-email pool))]
|
||||
|
||||
(when-not profile
|
||||
(ex/raise :type :validation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue