aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-04-18 11:26:38 +0000
committerlambda <pleromagit@rogerbraun.net>2018-04-18 11:26:38 +0000
commita80cdd590648d4eb812503fbf995598e6b4a95cb (patch)
tree24a65608c90e7962a4b15d1676a0895301d6404f /lib/pleroma/web/oauth/oauth_controller.ex
parente153b364a71de431787db236c57114f229162ddf (diff)
parent947431e9aa1d4dbf85f9ccc270f1989737744ed4 (diff)
downloadpleroma-a80cdd590648d4eb812503fbf995598e6b4a95cb.tar.gz
Merge branch 'fix/login-with-username-or-email' into 'develop'
MastoAPI and OAuth: allow login with either email or username. See merge request pleroma/pleroma!118
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex
index 05f366611..6297b7bae 100644
--- a/lib/pleroma/web/oauth/oauth_controller.ex
+++ b/lib/pleroma/web/oauth/oauth_controller.ex
@@ -29,7 +29,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do
"redirect_uri" => redirect_uri
} = params
}) do
- with %User{} = user <- User.get_cached_by_nickname(name),
+ with %User{} = user <- User.get_by_nickname_or_email(name),
true <- Pbkdf2.checkpw(password, user.password_hash),
%App{} = app <- Repo.get_by(App, client_id: client_id),
{:ok, auth} <- Authorization.create_authorization(app, user) do