Commit 762b32cb779088d54448749717b5539d53393740

Authored by Antonio Terceiro
1 parent cf24a677

ActionItem1165: send e-mail AFTER enabling it

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/user.rb
... ... @@ -39,7 +39,7 @@ class User < ActiveRecord::Base
39 39 @person_data || {}
40 40 end
41 41  
42   - before_update do |user|
  42 + after_update do |user|
43 43 if !User.find(user.id).enable_email and user.enable_email and !user.environment.nil?
44 44 User::Mailer.deliver_activation_email_notify(user)
45 45 end
... ...