Due to security concerns, passwords for users are hashed in the backend. As a result, directly inserting users into the iUser table would lead to a mismatch. I would recommend using a form to add users. You can achieve this by navigating to the “Forms” section and selecting “iUser” as your table.
I want to create a user when the admin adds new staff. I have created a user details form which has other details too.
So I wanted to insert those details in iUser whenever new staff is added and mail the details to the staff. Won’t this be possible, if I apply the same hashing algo while storing details?
Regarding your use case, the admin should have the ability to add new staff members, and you want to send an email to the added staff members. This can be achieved within Five using the invite email feature. Here’s how you can do it:
Once you’re on the instances page, navigate to the “Mail” tab. At the bottom, you’ll find a field labelled “Invite Email.” Double-click on that field, and an editor will open up, allowing you to set up your invite email. You can even add links to this email that redirect the user to update their password.
After configuring your invite email, run your application and log in as an admin. Since your app is a multi-user app, you should have a menu item labelled “Users.” Click on it, and then select “Add Item.”
Here, the admin can add new users to the app. Once a user has been added, they will receive an invite email that we set up in step 2. Additionally, you’ll find a button on the header bar that directly sends the invite email to the users.