Mercurial > hg > soundsoftware-site
comparison app/controllers/users_controller.rb @ 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 | aedfe093ec32 |
children | e408a3f7089f |
comparison
equal
deleted
inserted
replaced
62:39db1b84d09f | 63:b5bd39e27658 |
---|---|
154 @user.mail_notification = params[:notification_option] || 'only_my_events' | 154 @user.mail_notification = params[:notification_option] || 'only_my_events' |
155 @user.pref.attributes = params[:pref] | 155 @user.pref.attributes = params[:pref] |
156 @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') | 156 @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') |
157 | 157 |
158 @ssamr_user_details = @user.ssamr_user_detail | 158 @ssamr_user_details = @user.ssamr_user_detail |
159 @ssamr_user_details.description = params[:ssamr_user_details][:description] | 159 if params[:ssamr_user_details].nil? or params[:ssamr_user_details].empty? |
160 | 160 @ssamr_user_details.description = @user.ssamr_user_detail.description |
161 @ssamr_user_details.save! | 161 else |
162 | 162 @ssamr_user_details.description = params[:ssamr_user_details][:description] |
163 @ssamr_user_details.save! | |
164 end | |
165 | |
163 if @user.save | 166 if @user.save |
164 @user.pref.save | 167 @user.pref.save |
165 @user.notified_project_ids = (params[:notification_option] == 'selected' ? params[:notified_project_ids] : []) | 168 @user.notified_project_ids = (params[:notification_option] == 'selected' ? params[:notified_project_ids] : []) |
166 | 169 |
167 if was_activated | 170 if was_activated |