mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-09 16:55:29 +00:00
Fixes username helper
This commit is contained in:
parent
bdf267dea5
commit
f987a352c6
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ from bookwyrm.utils import regex
|
||||||
|
|
||||||
def get_user_from_username(viewer, username):
|
def get_user_from_username(viewer, username):
|
||||||
"""helper function to resolve a localname or a username to a user"""
|
"""helper function to resolve a localname or a username to a user"""
|
||||||
if viewer.localname == username:
|
if viewer.is_authenticated and viewer.localname == username:
|
||||||
# that's yourself, fool
|
# that's yourself, fool
|
||||||
return viewer
|
return viewer
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue