Back

creat new user as employee

  • 1
  • Users
  • Web
dazio
6 Jun, 2023, 12:50

I want to create new user as employee. I want store data like date of birth, salary, address etc .

These data should go to different table so we can later update and also employee can login into application later.

TL;DR
Solution: - It is not possible to directly create a new user as an employee. - You will still need to use Appwrite built-in Auth. However, you can load the logged-in user and match their document in the employee collection. - To store additional details like date of birth, salary, and address, create a new collection specifically for employee details and store the data along with the userId. - This way, you can later update the employee details separately and the employee can also log in to the application later.
Susmita
6 Jun, 2023, 12:51

I would suggest you to create a new collection for that to store the details along with the userId

dazio
6 Jun, 2023, 13:06

Yes I have created an employee collection.. now I want to login as user with employee credentials. Is it possible?

Binyamin
6 Jun, 2023, 13:33

You can't do that You'll still need to use Appwrite built-in Auth, But, anytime you load a logged-in user you'll load is matched document in the employee collection.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more