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

make invites default to 5 again

parent bd6617ea
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -54,7 +54,7 @@ class Invitation < ActiveRecord::Base ...@@ -54,7 +54,7 @@ class Invitation < ActiveRecord::Base
def self.create_invitee(opts = {}) def self.create_invitee(opts = {})
invitee = opts[:existing_user] || new_user_by_service_and_identifier(opts[:service], opts[:identifier]) invitee = opts[:existing_user] || new_user_by_service_and_identifier(opts[:service], opts[:identifier])
return invitee if opts[:service] == 'email' && !opts[:identifier].match(Devise.email_regexp) return invitee if opts[:service] == 'email' && !opts[:identifier].match(Devise.email_regexp)
invitee.invites = opts[:invites] || 0 invitee.invites = opts[:invites] || 5
if invitee.new_record? if invitee.new_record?
invitee.errors.clear invitee.errors.clear
invitee.serialized_private_key ||= User.generate_key invitee.serialized_private_key ||= User.generate_key
......
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