My app has to assign a role to the user upon signup, either supplier or consumer and depending on which is chosen a different section of the application appears. How can I create this upon registration so that the chosen user type is then assigned to that new register registered us for all future logins
Hi @Rogue
You can use a dropdown for this and set up redirection accordingly. To implement this, create a collection named “User Roles” and save the two roles in it. When a new user signs up, they can select their role from the dropdown.
Hi,
Alternatively you can add a true/false property on the users collection like "supplier/consumer
If it’s false it’ll be supplier, if true it’ll be consumer, and link them to the relevant screen accordingly
Hi All, appreciate the feedback!
I have managed to create the drop-down (woohoo!)…but I need to embed the following logic / actions:
-
When the user selects their role, their profile needs to be updated with that role, for future logins.
-
When selecting a role from the drop-down, depending on what option was selected, the user needs to be directed to the respective screen. i.e. if they select ‘Consumer’ it needs to take them to the Consumer home screen.
Any ideas? Thanks in advance!
Since you are using the dorpdown method you’ll need to makke a relationship between the users and the roles, “one role to many users”
when the user clicks “continue” button, put an action to update loggedin user and update the role to the selected role
2nd action “link” to the supplier screen (add a condition under “advanced” in the link action (if-other components- dropdown-selected role- name is equal to- Supplier)
3rd action, link to consumer
I have something very similar in mind, is this the best way to accomplish directing different types of roles - each will get a different sign in screen, initially the supplier should be provided with their own password which will be emailed to them, so that when they first sign in, it will be with the email/password provided, they can then change it – how would this be accomplished in the user collection?
Hey Jerry,
My usual goto solution in these cases is that I build a different app for each type of users, share the same database between them, it makkes the apps much lighter, since the users will never need to see the “other side”
but in your case it’s simple, when creating the profiles, emails and passwords you should just add true/false property, then on the login button let’s say, you can add conditional links, (link to supplier screen if loggedin user- supplier- is true) and so on for all your cases
thank you
what is the best way to create an original password to block others from getting in
here you go : https://api.genratr.com/
Hi Ben, before i post my screens, am i on the wrong track here? Should i just do two apps?
Regardless…created this but no luck.
Based on this:
Actions:
Again, if you think i am over complicating things…i can try build two apps rather. Once again appreciate the feedback!
basically I want to create a field that will be the password I generate, they use that to log in , and then they create their own, for further access
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.