Skip to content
Extraits de code Groupes Projets
Valider b9ab7995 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

ironing out invites

parent b300adbe
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -37,7 +37,6 @@ class InvitationsController < Devise::InvitationsController ...@@ -37,7 +37,6 @@ class InvitationsController < Devise::InvitationsController
raise "Invalid Invite Token" raise "Invalid Invite Token"
end end
user = User.find_by_invitation_token(params[:user][:invitation_token]) user = User.find_by_invitation_token(params[:user][:invitation_token])
puts user.inspect
user.seed_aspects user.seed_aspects
user.accept_invitation!(params[:user]) user.accept_invitation!(params[:user])
rescue Exception => e rescue Exception => e
......
...@@ -381,7 +381,7 @@ class User ...@@ -381,7 +381,7 @@ class User
log_string << "inviter=#{invitations_to_me.first.from.diaspora_handle}" if invitations_to_me.first log_string << "inviter=#{invitations_to_me.first.from.diaspora_handle}" if invitations_to_me.first
Rails.logger.info log_string Rails.logger.info log_string
self.setup(opts) self.setup(opts)
puts "foobar"
self.invitation_token = nil self.invitation_token = nil
self.password = opts[:password] self.password = opts[:password]
self.password_confirmation = opts[:password_confirmation] self.password_confirmation = opts[:password_confirmation]
...@@ -419,6 +419,8 @@ class User ...@@ -419,6 +419,8 @@ class User
self.serialized_private_key ||= User.generate_key self.serialized_private_key ||= User.generate_key
self.person.serialized_public_key = OpenSSL::PKey::RSA.new(self.serialized_private_key).public_key self.person.serialized_public_key = OpenSSL::PKey::RSA.new(self.serialized_private_key).public_key
puts self.serialized_public_key
self self
end end
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
%p %p
= f.label :password_confirmation , t('password_confirmation') = f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again') = f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
= f.hidden_field :invitation_token
= f.submit t('registrations.new.sign_up') = f.submit t('registrations.new.sign_up')
%br %br
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter