mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Adding user find by id for staff.
This commit is contained in:
parent
cf8845996b
commit
a42824e67d
1 changed files with 2 additions and 0 deletions
|
@ -1136,6 +1136,8 @@ def find_friends(request):
|
|||
if results:
|
||||
email = results.group(0)
|
||||
profiles = MSocialProfile.objects.filter(email__iexact=email)[:limit]
|
||||
if query.isdigit() and request.user.is_staff:
|
||||
profiles = MSocialProfile.objects.filter(user_id=int(query))[:limit]
|
||||
if not profiles:
|
||||
profiles = MSocialProfile.objects.filter(username__iexact=query)[:limit]
|
||||
if not profiles:
|
||||
|
|
Loading…
Add table
Reference in a new issue