From: Tom Hughes Date: Sun, 25 Nov 2007 12:38:48 +0000 (+0000) Subject: Force new users to enter their email address twice to try and avoid so X-Git-Tag: live~8030 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cb330ffd7a1861830c813d35507ef4b8b288d8f0?ds=sidebyside Force new users to enter their email address twice to try and avoid so many incorrect email addresses with typos in... --- diff --git a/app/models/user.rb b/app/models/user.rb index eccc006c2..dc461e855 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -11,6 +11,7 @@ class User < ActiveRecord::Base has_many :preferences, :class_name => "UserPreference" validates_presence_of :email, :display_name + validates_confirmation_of :email, :message => 'Email addresses must match' validates_confirmation_of :pass_crypt, :message => 'Password must match the confirmation password' validates_uniqueness_of :display_name, :allow_nil => true validates_uniqueness_of :email diff --git a/app/views/user/new.rhtml b/app/views/user/new.rhtml index 3fa409123..dca1e8509 100644 --- a/app/views/user/new.rhtml +++ b/app/views/user/new.rhtml @@ -8,6 +8,7 @@ By creating an account, you agree that all work uploaded to openstreetmap.org an <% form_tag :action => 'save' do %> +
Email Address<%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %>
Confirm Email Address<%= text_field('user', 'email_confirmation',{:size => 50, :maxlength => 255}) %>
Display Name<%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %>
Password<%= password_field('user', 'pass_crypt',{:size => 50, :maxlength => 255}) %>
Confirm Password<%= password_field('user', 'pass_crypt_confirmation',{:size => 50, :maxlength => 255}) %>