mirror of
https://github.com/penpot/penpot.git
synced 2025-04-01 09:31:26 -05:00
🐛 Use correct parameters on password update on login
This commit is contained in:
parent
1f023eebeb
commit
84c8a6eced
1 changed files with 7 additions and 9 deletions
|
@ -63,17 +63,15 @@
|
||||||
:hint "login is disabled in this instance"))
|
:hint "login is disabled in this instance"))
|
||||||
|
|
||||||
(letfn [(check-password [conn profile password]
|
(letfn [(check-password [conn profile password]
|
||||||
(when (= (:password profile) "!")
|
(if (= (:password profile) "!")
|
||||||
(ex/raise :type :validation
|
(ex/raise :type :validation
|
||||||
:code :account-without-password
|
:code :account-without-password
|
||||||
:hint "the current account does not have password"))
|
:hint "the current account does not have password")
|
||||||
(let [result (profile/verify-password cfg password (:password profile))]
|
(let [result (profile/verify-password cfg password (:password profile))]
|
||||||
(when (:update result)
|
(when (:update result)
|
||||||
(l/trace :hint "updating profile password" :id (:id profile) :email (:email profile))
|
(l/trace :hint "updating profile password" :id (:id profile) :email (:email profile))
|
||||||
(profile/update-profile-password! (assoc cfg ::db/conn conn)
|
(profile/update-profile-password! conn (assoc profile :password password)))
|
||||||
(assoc profile :password password)))
|
(:valid result))))
|
||||||
(:valid result)))
|
|
||||||
|
|
||||||
|
|
||||||
(validate-profile [conn profile]
|
(validate-profile [conn profile]
|
||||||
(when-not profile
|
(when-not profile
|
||||||
|
|
Loading…
Add table
Reference in a new issue