Hey @automica !
Thank you for your feedback and kinda confirming that my steps/approach makes sense.
you might want to add a step to invalidate the token to prevent one person approving and then another person disapproving.
Correct, as soon as a member approves/disapproves the token must be deleted to avoid users messing around with it.
I assume your approval link will take the user to login and then see the user they are approving before they approve them?
Euh no, userA (=wants to join) is already registered and logged in. He can edit his account, chat with friends and create a team (or join a team if already created). In the case he needs to join, he'll click 'join-button'.
This click on button, will create a unique token (stored in database table for this) and a notification should be sent to UserB(already member). I'm planning to create a small user-profile-card that can be part of this notification/message, so UserB can immediately see who it is and decide to accept or refuse.
you might also want to add a 'team_leader' role
That is actually a very good idea, only problem with trying to implement this is the following situation.
Imagine you and me are in a team. You are actually the one who 'founded' the team (or the one that invests time/money/etc) and I'm just a member.
If I'm first to register the team, I would be team_leader.
While in reality you would/should be TL.... Hmmm maybe flaw in my approach... Good point though...