]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/passwords_controller.rb
Merge remote-tracking branch 'upstream/pull/3747'
[rails.git] / app / controllers / passwords_controller.rb
index 331575964aba6abaec47a8ade9467ae4504b2186..502b1357f29f9fb085833ecc78af61da0f964246 100644 (file)
@@ -46,7 +46,7 @@ class PasswordsController < ApplicationController
         if params[:user]
           current_user.pass_crypt = params[:user][:pass_crypt]
           current_user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
-          current_user.status = "active" if current_user.status == "pending"
+          current_user.activate if current_user.may_activate?
           current_user.email_valid = true
 
           if current_user.save