+ def edit
+ if params[:user] and params[:user][:display_name] and params[:user][:description]
+ @user.display_name = params[:user][:display_name]
+ @user.description = params[:user][:description]
+ if @user.save
+ flash[:notice] = "User edited OK."
+ redirect_to :controller => 'user', :action => 'account'
+ end
+ end
+ end
+
+ def go_public
+ @user.data_public = true
+ @user.save
+ flash[:notice] = 'All your edits are now public'
+ redirect_to :controller => 'user', :action => 'account'
+ end
+