# HG changeset patch # User Christophe Lincoln # Date 1487788071 -3600 # Node ID 5acf8ea65f7d6c5434edbe5f0d9d1db05b1177b4 # Parent 511841d477a381dc1a2c40ddb4e507f1a1ffd017 users plugin: handle user.sh script to add content to a user profile diff -r 511841d477a3 -r 5acf8ea65f7d plugins/users/users.cgi --- a/plugins/users/users.cgi Wed Feb 22 12:22:11 2017 +0100 +++ b/plugins/users/users.cgi Wed Feb 22 19:27:51 2017 +0100 @@ -176,7 +176,7 @@ user_box account_config="$PEOPLE/$(GET user)/account.conf" profile_config="$PEOPLE/$(GET user)/profile.conf" - + # account.conf if [ ! -f "$account_config" ]; then echo "No user profile for: $(GET user)" html_footer && exit 0 @@ -210,22 +210,17 @@ public_people fi - # Messages plugin integration - if [ -x "$plugins/messages/messages.cgi" ]; then - if check_auth && [ "$(GET user)" != "$user" ]; then - cat << EOT -
-$(gettext "Send message") -
-EOT - fi - fi - # Display personal user profile if [ -f "$PEOPLE/$USER/profile.txt" ]; then echo "

$(gettext "About me")

" cat $PEOPLE/$USER/profile.txt | wiki_parser fi + + # Run user.sh that plugins can provide to add content to a profile + for script in $(ls $plugins/*/user.sh); do + . ${script} + done + html_footer && exit 0 ;; *\ modprofile\ *)