Disable account activation mail on 2.4.5.stable
Added by Marco Descher almost 11 years ago
We are programmatically creating accounts on redmine, and the user has to externally verify its email address first. After he hase done this we are setting his user status from 3 to 1, which activates him. Now we don't want an email to be sent on this event. How may I suppress this email?
Thanks
Replies (1)
RE: Disable account activation mail on 2.4.5.stable
-
Added by Marco Descher almost 11 years ago
I could fix this by commenting app/controllers/users_controller.rb:145
such that it looks like
137 was_activated = (@user.status_change == [User::STATUS_REGISTERED, User::STATUS_ACTIVE]) 138 # TODO: Similar to My#account 139 @user.pref.attributes = params[:pref] 140 141 if @user.save 142 @user.pref.save 143 144 if was_activated --> #Mailer.account_activated(@user).deliver 146 elsif @user.active? && params[:send_information] && @user.password.present? && @user.auth_source_id.nil? 147 Mailer.account_information(@user, @user.password).deliver 148 end