X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3422bb541db16f6b6e7374689e82e982bd78664b..83d9f1f1642d71f3b590e7ee33b22e4c5da00c53:/app/controllers/users_controller.rb?ds=inline diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9d4b3d258..5ba1b702b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,4 +1,5 @@ class UsersController < ApplicationController + include EmailMethods include SessionMethods include UserMethods @@ -361,26 +362,4 @@ class UsersController < ApplicationController !blocked end - - def canonical_email(email) - local_part, domain = if email.nil? - nil - else - email.split("@") - end - - local_part.sub!(/\+.*$/, "") - - local_part.delete!(".") if %w[gmail.com googlemail.com].include?(domain) - - "#{local_part}@#{domain}" - end - - ## - # get list of MX servers for a domains - def domain_mx_servers(domain) - Resolv::DNS.open do |dns| - dns.getresources(domain, Resolv::DNS::Resource::IN::MX).collect { |mx| mx.exchange.to_s } - end - end end