Answer the question
In order to leave comments, you need to log in
Yi2 how to generate invite link?
Good afternoon.
I need to generate an invitation link, something like a ref link.
The meaning is this, there is a company that wants to invite an employee, a registration link is sent to the employee’s mail, after he has registered, his ID (user_id) should appear in the company table. I can't figure out how to generate a link.
I implemented the sending of a simple link (a link to registration), but I don’t know or don’t understand how to pass parameters, so that when an employee registers, his id gets into the Company table?
There is a table Profile, Company, User
Profile
id | ... | ... | ... | company company
id
| user_id
User
id | ... | ... | ... |
Answer the question
In order to leave comments, you need to log in
In the simplest version:
1. Make a table of tokens
2. When a company invites an employee, generate a unique token and put it and the company ID in this table
3. Add the generated token to the link that is sent in the letter
4. When the employee clicks on the link, pull it from get- parameters token and look for a company by it in the table of tokens
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question