projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e394e59
)
fix formatting
author
William Pitcock
<nenolod@dereferenced.org>
Sun, 26 Aug 2018 22:46:25 +0000
(22:46 +0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Sun, 26 Aug 2018 22:46:25 +0000
(22:46 +0000)
lib/pleroma/web/router.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/router.ex
b/lib/pleroma/web/router.ex
index 913152c5a33208250a70ed28051df31799c8425f..68e159f6abcc2819a007600ee8b0c99cbbceab67 100644
(file)
--- a/
lib/pleroma/web/router.ex
+++ b/
lib/pleroma/web/router.ex
@@
-13,9
+13,12
@@
defmodule Pleroma.Web.Router do
:ok,
cond do
# First, try logging in as if it was a name
- user = Repo.get_by(User, %{nickname: username_or_email}) -> user
+ user = Repo.get_by(User, %{nickname: username_or_email}) ->
+ user
+
# If we get nil, we try using it as an email
- user = Repo.get_by(User, %{email: username_or_email}) -> user
+ user = Repo.get_by(User, %{email: username_or_email}) ->
+ user
end
}
end