Diff
Modified: trunk/app/controllers/application_controller.rb (3025 => 3026)
--- trunk/app/controllers/application_controller.rb 2012-06-13 09:15:08 UTC (rev 3025)
+++ trunk/app/controllers/application_controller.rb 2012-06-13 09:31:09 UTC (rev 3026)
@@ -26,7 +26,7 @@
include ActionView::Helpers::NumberHelper
def check_for_sleeper
- if logged_in?
+ if request.method != :get && logged_in?
if current_user.account_status == "sleep"
current_user.update_attribute(:account_status, "recheck")
end
Modified: trunk/app/controllers/profiles_controller.rb (3025 => 3026)
--- trunk/app/controllers/profiles_controller.rb 2012-06-13 09:15:08 UTC (rev 3025)
+++ trunk/app/controllers/profiles_controller.rb 2012-06-13 09:31:09 UTC (rev 3026)
@@ -76,6 +76,8 @@
# maintain legal value for "null avatar"
(params[:profile][:picture_id] = nil) if (params[:profile][:picture_id].to_i == 0)
+ raise "Cannot update profile until user is activated" unless @profile.owner.activated_at
+
respond_to do |format|
if @profile.update_attributes(params[:profile])
flash[:notice] = 'Profile was successfully updated.'
Modified: trunk/app/models/user.rb (3025 => 3026)
--- trunk/app/models/user.rb 2012-06-13 09:15:08 UTC (rev 3025)
+++ trunk/app/models/user.rb 2012-06-13 09:31:09 UTC (rev 3026)
@@ -158,7 +158,10 @@
self.unconfirmed_email = nil
# Activate user if not previously activated
- self.activated_at = Time.now unless self.activated?
+ unless self.activated?
+ self.activated_at = Time.now
+ self.account_status = "sleep"
+ end
return self.save
else