]> git.openstreetmap.org Git - rails.git/commitdiff
Don't bother verifying an email address that hasn't changed
authorTom Hughes <tom@compton.nu>
Mon, 9 Sep 2013 15:05:16 +0000 (16:05 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 9 Sep 2013 15:05:16 +0000 (16:05 +0100)
app/controllers/user_controller.rb

index a7822e47fd436188d703fe55493482d9649a92cb..db37d113105fb1373df80a882021e70e0046f61a 100644 (file)
@@ -732,7 +732,7 @@ private
 
       cookies.permanent["_osm_username"] = user.display_name
 
-      if user.new_email.blank?
+      if user.new_email.blank? or user.new_email == user.email
         flash.now[:notice] = t 'user.account.flash update success'
       else
         user.email = user.new_email