diff options
author | lain <lain@soykaf.club> | 2020-05-07 08:14:54 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-07 08:14:54 +0000 |
commit | f4c2bf0985f3d65d9caa6f02a71c89db9f070fb1 (patch) | |
tree | a7f4ece6dcd0a534b464e455fa382d3ebd8f4d07 /lib/pleroma/web/common_api/utils.ex | |
parent | 68a126317d7cdd670c8e244319da08ff85639d33 (diff) | |
parent | 3d0c567fbc3506770fdac5f1269c45b244928747 (diff) | |
download | pleroma-f4c2bf0985f3d65d9caa6f02a71c89db9f070fb1.tar.gz |
Merge branch 'issue/209' into 'develop'
[#209] 2FA/two_factor_authentication support
See merge request pleroma/pleroma!801
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 6540fa5d1..793f2e7f8 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -402,6 +402,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do end end + @spec confirm_current_password(User.t(), String.t()) :: {:ok, User.t()} | {:error, String.t()} def confirm_current_password(user, password) do with %User{local: true} = db_user <- User.get_cached_by_id(user.id), true <- AuthenticationPlug.checkpw(password, db_user.password_hash) do |