mpociot / teamwork

User to Team associations with invitation system for the Laravel 5 Framework
MIT License
1.07k stars 170 forks source link

Invite new user by email #15

Closed michellaurent closed 8 years ago

michellaurent commented 8 years ago

Is it possible to invite somebody that us not yet a user by email ? So, if it accept the invitation, it will have to register first and then will be automatically added to the team.

sschlein commented 8 years ago

Yes - that's exactly what teamwork does :-)

mpociot commented 8 years ago

You need to implement the auth logic on your own. This package does not store any team related info in the session when joining teams.

So before joining the team you'll need to check if the user is authenticated , and if he isn't, store the team I'd in the session. After the registration check if the session contains a team I'd and join it.