Mercurial > hg > soundsoftware-site
changeset 63:b5bd39e27658 luisf
Users status can now be changed (activated/locked)
author | luisf@figasmac.local |
---|---|
date | Fri, 03 Dec 2010 13:14:12 +0000 |
parents | 39db1b84d09f |
children | 9d42bcda8cea |
files | app/controllers/users_controller.rb |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/users_controller.rb Fri Dec 03 09:54:48 2010 +0000 +++ b/app/controllers/users_controller.rb Fri Dec 03 13:14:12 2010 +0000 @@ -156,10 +156,13 @@ @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') @ssamr_user_details = @user.ssamr_user_detail - @ssamr_user_details.description = params[:ssamr_user_details][:description] - - @ssamr_user_details.save! - + if params[:ssamr_user_details].nil? or params[:ssamr_user_details].empty? + @ssamr_user_details.description = @user.ssamr_user_detail.description + else + @ssamr_user_details.description = params[:ssamr_user_details][:description] + @ssamr_user_details.save! + end + if @user.save @user.pref.save @user.notified_project_ids = (params[:notification_option] == 'selected' ? params[:notified_project_ids] : [])