ironing out invites

This commit is contained in:
maxwell 2010-12-04 16:49:45 -08:00
parent b300adbef5
commit b9ab799569
3 changed files with 4 additions and 2 deletions

View file

@ -37,7 +37,6 @@ class InvitationsController < Devise::InvitationsController
raise "Invalid Invite Token"
end
user = User.find_by_invitation_token(params[:user][:invitation_token])
puts user.inspect
user.seed_aspects
user.accept_invitation!(params[:user])
rescue Exception => e

View file

@ -381,7 +381,7 @@ class User
log_string << "inviter=#{invitations_to_me.first.from.diaspora_handle}" if invitations_to_me.first
Rails.logger.info log_string
self.setup(opts)
puts "foobar"
self.invitation_token = nil
self.password = opts[:password]
self.password_confirmation = opts[:password_confirmation]
@ -419,6 +419,8 @@ class User
self.serialized_private_key ||= User.generate_key
self.person.serialized_public_key = OpenSSL::PKey::RSA.new(self.serialized_private_key).public_key
puts self.serialized_public_key
self
end

View file

@ -19,6 +19,7 @@
%p
= f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
= f.hidden_field :invitation_token
= f.submit t('registrations.new.sign_up')
%br