tazbug rev 151

Fix in users plugin (from tinycm)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Feb 28 22:59:52 2017 +0100 (2017-02-28)
parents 3e8160d21207
children ef44034e6d3a
files web/plugins/users/users.cgi
line diff
     1.1 --- a/web/plugins/users/users.cgi	Mon Feb 27 13:50:39 2017 +0100
     1.2 +++ b/web/plugins/users/users.cgi	Tue Feb 28 22:59:52 2017 +0100
     1.3 @@ -176,6 +176,7 @@
     1.4  		user_box
     1.5  		account_config="$PEOPLE/$(GET user)/account.conf"
     1.6  		profile_config="$PEOPLE/$(GET user)/profile.conf"
     1.7 +		
     1.8  		# account.conf
     1.9  		if [ ! -f "$account_config" ]; then
    1.10  			echo "No user profile for: $(GET user)"
    1.11 @@ -183,18 +184,12 @@
    1.12  		else
    1.13  			. ${account_config}
    1.14  		fi
    1.15 -		# Init profile.conf
    1.16 -		if [ -f "${profile_config}" ]; then
    1.17 +		
    1.18 +		# profile.conf
    1.19 +		if [ -f "$profile_config" ]; then
    1.20  			. ${profile_config}
    1.21 -		else
    1.22 -			cat > $PEOPLE/$user/profile.conf << EOT
    1.23 -# User profile
    1.24 -WEBSITE="$website"
    1.25 -FACEBOOK="$facebook"
    1.26 -TWITTER="$twitter"
    1.27 -EOT
    1.28 -			chmod 0600 $PEOPLE/$user/profile.conf
    1.29  		fi
    1.30 +		
    1.31  		cat << EOT
    1.32  <h2>$(get_gravatar $MAIL) $NAME</h2>
    1.33  
    1.34 @@ -216,7 +211,7 @@
    1.35  			cat $PEOPLE/$USER/profile.txt | wiki_parser
    1.36  		fi
    1.37  		
    1.38 -		# Run user.sh so that plugins can provide to add content to a profile
    1.39 +		# Run user.sh that plugins can provide to add content to a profile
    1.40  		for script in $(ls $plugins/*/user.sh); do
    1.41  			. ${script}
    1.42  		done