Guys,
I created this topic because I couldn’t find a specific title. That way I will explain what I want. In my app I have a login screen, a registration screen and a main menu.
The first time this user performs the access registration, filling in the login screen and password, he will be directed to the registration screen (personal data) and after that to the Main Menu. What I want is when he logs in again he is directed to the Main Menu.
I thought of using a tinydb and a session check.
The problem I don’t know how to do it and on which screen to put this function. Can someone help me?
Yes, you can save in a tinyDb if is the first time or not but remember that tiny is a local Db so if user changes device or installs again app he losts this information. If your flow is login => data user => main menu , you have to add this control after the login screen .
Here the first question : first login and login will be the same ? Or you want to create two different sections ,one for login and one for first time he will choose the username and password?
Second question : where you store list of users? Instead of use TinyDb you can search in the list users to verify the name. If the name exist, it means that is second time so go directly to main menu, if name doesn’t exist go to data section .
When user login succes,
Store in tinydb with tag (session check) value (yes)
When screen initialise
If Call tinydb with a tag (session check) , value if not found (no) = no
Then tell the user to complete registration
Else direct the user to go to Main menu screen
In this model I made for an intro screen.
There are three images referring to the purpose of the app. After that, the login screen opens. If he does not see the access registration, the second time he enters he would already go to the login screen. I don’t know how to do this inside a login screen. Does anyone have an example to give me?
Guys,
I had opened a ticket: Change Session. This call was answered by two people from the Forum but was blocked by the Administrator because the blocks I used were from another platform.
I apologized but I couldn’t continue with a test I did.
When the user enters for the first time with his login and password, he will go to the registration screen and after registration he will go to the menu screen. What I want is that no second time she enters with login and password it goes straight to the menu screen.
In this small test menu, I created a login screen, a data user screen and a menu screen. I couldn’t proceed because it’s the first time I’ve done it and I didn’t search the forum because I don’t even know what title it would be for.
(tested and found working)
But keep in mind, it will not consider whether user completed registartion or not…
If you want the user those who completed the registration only have to bypass the login mean, move the tinydb save tag value block into when user completed the registration successfull…
Guys, I want to thank everyone for helping me. I just made one change. After completing the Data_User, the screen returns to the login. When he logs in he goes straight to the Menu. Now there’s a question. Suppose he uninstalls the app and installs it again. How to prevent it from going to the Data_User?