Login with multiple users

John Makinano shared this problem 2 years ago
Solved

I'm making a web app prototype.


I already made my log in with the event and condition, i based it on this.

https://www.justinmind.com/support/create-a-log-in-form-in-your-prototypes-with-data-master-records/


I have 3 users in my datamaster 'user'(username,password) - user1,user1 - user2,user2 - user3,user3.


Anyways, it's working, i can log in on any acc on my datamaster 'user', what i want to know is that, the 3 users are fundamentally different thus have different privs or access to different webpages.


In a normal php code, when i would log in, i would also send the username(assuming its unique) to the controller(mvc) to determine which acc is logged in.


How can i do that in justinmind?

Comments (3)

photo
1

Hi John,


Are you referring to having the Username be displayed on screens? If so, just create another variable that detects which user enters, then have a 'On page load - set value' event for the element you'd like to display the username.


Let me know if this isn't what you're looking for.


Best,

Danielle

photo
1

How do i go about detecting which user logged on?

photo
1

Upon a successful login, you can store the user value into a variable before leaving the page. That value will persist through the session (until you programmatically change it or reload/restart the session) and use that variable as a test on each case for different functionality.

when usernameVar = user1 do someActionHereFor_user1

else

when usernameVar = user2 do someActionHereFor_user2

...

photo