Use user's email address as enterprise.email

During registration, use the given email address only as public visible
profile email address. Set the internal notification email address
`enterprise.email` to the owner's email address. That can be changed
later.
This commit is contained in:
Maikel Linke
2016-03-09 14:52:52 +11:00
parent c1647ccd2c
commit 61fb34e738

View File

@@ -55,7 +55,6 @@ Darkswarm.factory "EnterpriseRegistrationService", ($http, RegistrationService,
excluded = [ 'address', 'country', 'id' ]
for key, value of @enterprise when key not in excluded
enterprise[key] = value
enterprise.email = enterprise.email_address
enterprise.address_attributes = @enterprise.address if @enterprise.address?
enterprise.address_attributes.country_id = @enterprise.country.id if @enterprise.country?
enterprise