FOSUserBundle
FOSUserBundle copied to clipboard
Send Invitation Form
Greetings!
Is there a ready solution how to implement a "Send invitation" form? There is an invitation code field in a registration form, but I can't find functionality how to send an invitation to some e-mail.
Thanx in advance.
+1 (but seems nobody relply here.....)
+1
Well, the documentation shows you how to implement the invitation in the registration form, because it is a place where you need to integrate with the FOSUserBundle. Sending an invitation is totally unrelated. It is a matter of creating the invitation object and sending an email containing the code. Simply read the Symfony documentation about sending emails.
+1
+1
@stof I agree that sending the invitation code is unrelated to how to implement the invitation in the registration form. However, that section talks about a Data Transformer, and there's little to no explanation on how all of those components work together.
I figured that by persisting an Invitation to the database, and subsequently sending an email with the code just created would suffice, but for some people that step is not as clear.
I would be more than pleased if someone can explain how to add a invitation form because I am stuck on this from a few days. When it comes to invite users, a form for doing that would me more then neccessary
@XWB IMHO we can remove this from the 2.0 milestone, because this is not really related to the next release. It's a general question.
@core23 :+1:
There's a lot more that needs to happen here and the Documentation doesn't even hint as to what's next. Sending an invite only generates an Invitation record (code, email, sent). There needs to be a step to insert a row into the users table with the association to the invitation-- But you can't do that with the invite because you don't have all the users information other than their email. Nothing states which route is to be contained in the email once the user gets the code. I can only assume they get sent to the registration page and proceed to fill out username, first, last name, etc.. Submitting the form results in a User record minus the invitation association. If you're going to Document a 'feature' then I'd assume you'd add all the bits rather than "Oh, BTW FOSUserBundle sort of does <This>". And at this point, I'm not even sure why I tried to follow the docs and just wired this up my own way. I see no reason to even have a Invitation table and just use a confirmation token and call it a day.