mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-18 17:15:13 +01:00
Fix logic with gravatar email
This commit is contained in:
parent
375df0c27d
commit
2b35da71fc
@ -339,9 +339,9 @@ class PanelHandler(BaseHandler):
|
||||
|
||||
# Get grvatar hash for profile pictures
|
||||
if (
|
||||
self.helper.check_internet()
|
||||
and exec_user["email"] != "default@example.com"
|
||||
and exec_user["email"] == ""
|
||||
not self.helper.check_internet()
|
||||
or exec_user["email"] != "default@example.com"
|
||||
or exec_user["email"] != ""
|
||||
):
|
||||
gravatar = libgravatar.Gravatar(
|
||||
libgravatar.sanitize_email(exec_user["email"])
|
||||
|
@ -29,9 +29,9 @@ class ApiUsersUserPfpHandler(BaseApiHandler):
|
||||
|
||||
# Get grvatar hash for profile pictures
|
||||
if (
|
||||
self.helper.check_internet()
|
||||
and user["email"] != "default@example.com"
|
||||
and user["email"] == ""
|
||||
not self.helper.check_internet()
|
||||
or user["email"] != "default@example.com"
|
||||
or user["email"] != ""
|
||||
):
|
||||
gravatar = libgravatar.Gravatar(libgravatar.sanitize_email(user["email"]))
|
||||
url = gravatar.get_image(
|
||||
|
@ -139,9 +139,9 @@ class ServerHandler(BaseHandler):
|
||||
rating = "g"
|
||||
|
||||
if (
|
||||
self.helper.check_internet()
|
||||
and exec_user["email"] != "default@example.com"
|
||||
and exec_user["email"] == ""
|
||||
not self.helper.check_internet()
|
||||
or exec_user["email"] != "default@example.com"
|
||||
or exec_user["email"] != ""
|
||||
):
|
||||
gravatar = libgravatar.Gravatar(
|
||||
libgravatar.sanitize_email(exec_user["email"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user