summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-05-28 09:55:51 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-05-28 09:55:51 +0000
commit0418a92c4837de0169a0173ef202d28494a86b23 (patch)
tree67587043e01ba1eaa0d2dea941359b7e61aba587 /app/views
parent76547303572b7e009a81c19c08cf72190616b57e (diff)
downloadredmine-0418a92c4837de0169a0173ef202d28494a86b23.tar.gz
redmine-0418a92c4837de0169a0173ef202d28494a86b23.zip
Merged r21606 to 5.0-stable (#37157).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21615 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/users/show.api.rsb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/users/show.api.rsb b/app/views/users/show.api.rsb
index f6a323265..d84be914e 100644
--- a/app/views/users/show.api.rsb
+++ b/app/views/users/show.api.rsb
@@ -9,7 +9,7 @@ api.user do
api.updated_on @user.updated_on
api.last_login_on @user.last_login_on
api.passwd_changed_on @user.passwd_changed_on
- api.avatar_url gravatar_url(@user.mail, {rating: nil, size: nil, default: Setting.gravatar_default}) if Setting.gravatar_enabled?
+ api.avatar_url gravatar_url(@user.mail, {rating: nil, size: nil, default: Setting.gravatar_default}) if @user.mail && Setting.gravatar_enabled?
api.twofa_scheme @user.twofa_scheme if User.current.admin? || (User.current == @user)
api.api_key @user.api_key if User.current.admin? || (User.current == @user)
api.status @user.status if User.current.admin?