Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -N -r1.284.2.25 -r1.284.2.26 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 29 Aug 2019 10:24:58 -0000 1.284.2.25 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 2 Sep 2019 17:00:08 -0000 1.284.2.26 @@ -1509,14 +1509,21 @@ Class create author -superclass user_id -parameter { {photo_size 54} {with_photo true} + {with_gravatar true} {with_user_link false} {label #xowiki.formfield-author#} } author instproc pretty_value {v} { if {$v ne ""} { acs_user::get -user_id $v -array user - if {[:with_photo]} { - set src "/shared/portrait-bits.tcl?user_id=$v" + if {${:with_photo}} { + set portrait_id [acs_user::get_portrait_id -user_id $v] + if {$portrait_id == 0 && ${:with_gravatar}} { + set src [::xowiki::includelet::gravatar url \ + -email $user(email) -size ${:photo_size}] + } else { + set src "/shared/portrait-bits.tcl?user_id=$v" + } set photo "" set photo_class "photo" } else {