# Hi! there I use variable admin to check the sign in user is admin or user from sign in screen

**URL:** https://community.thunkable.com/t/hi-there-i-use-variable-admin-to-check-the-sign-in-user-is-admin-or-user-from-sign-in-screen/1461331
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [August 21, 2021, 5:53am UTC](https://community.thunkable.com/t/hi-there-i-use-variable-admin-to-check-the-sign-in-user-is-admin-or-user-from-sign-in-screen/1461331 "2021-08-21T05:53:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yinnatthachatfly](https://avatars.discourse-cdn.com/v4/letter/y/7ba0ec/32.png) [@yinnatthachatfly](https://community.thunkable.com/u/yinnatthachatfly)
#### Post date: [August 21, 2021, 5:53am UTC](https://community.thunkable.com/t/hi-there-i-use-variable-admin-to-check-the-sign-in-user-is-admin-or-user-from-sign-in-screen/1461331/1 "2021-08-21T05:53:29Z")

</div>

The admin variable is in sign in screen . If Admin sign in admin variable is true or if user sign in ,admin variable is false. And after sign in we navigate to menu screen. In menu screen we check admin value. If true create job, create new user button’s visible are true , if not these button’s visible are false . But when I run and test . The value is correct but the menu screen is not. All button are shown. What can I do?

---

<div class="post-metadata">

### Author: ![yinnatthachatfly](https://avatars.discourse-cdn.com/v4/letter/y/7ba0ec/32.png) [@yinnatthachatfly](https://community.thunkable.com/u/yinnatthachatfly)
#### Post date: [August 21, 2021, 5:55am UTC](https://community.thunkable.com/t/hi-there-i-use-variable-admin-to-check-the-sign-in-user-is-admin-or-user-from-sign-in-screen/1461331/2 "2021-08-21T05:55:23Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/f/1f705ee9ef47a62913e8d1525ffee3cd928db911.png)

---

<div class="post-metadata">

### Author: ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)
#### Post date: [August 21, 2021, 8:24am UTC](https://community.thunkable.com/t/hi-there-i-use-variable-admin-to-check-the-sign-in-user-is-admin-or-user-from-sign-in-screen/1461331/3 "2021-08-21T08:24:20Z")

</div>

1. How do you set that a user is admin or a regular user, in the first place ?  
Let me tell you how i solved this admin/regular user issue. On my RealTime Database, one of the fields is “admin\_value”, that takes user`s e-mail value. So when program starts, it checks if e-mail used to login exists in that field, so app will recognize it as admin. If it doesnt exists, user is just a regular one. This cant be stored only on a local stored var, as anyone can clear app`s cache and admin status will be lost.

2. Screen shows only duplicates same thing. Not seeing any difference between “starts” and “opens” screens. When “screen starts” supposed to do some actions only the first time when screen is shown. “Open screens” does the actions everytime user navigate to that screen.  
I have the same need in my app, to do something one time only when i navigate to a screen, so i put in “screen starts”, but to do many other actions everytime when i navigate to that screen, except those actions already done when screen started for the first time.  
The problem is that for the first time when screen starts, both actions will take place.  
So i used a variable to not mess up actions, and let it in order.

Example:  
initialize logical\_var to true

when screen starts  
…  
…  
logical\_var set to false

when screen opens  
repeat while logical\_var  
wait 0.001 s  
…

This way, “open screens” actions will wait until all actions from “start screen” will execute first  
logical\_var will be set to false, and will remain this way for the whole time from now on, so will not interfere with next screen opens furthermore.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/hi-there-i-use-variable-admin-to-check-the-sign-in-user-is-admin-or-user-from-sign-in-screen/1461331/4 "2024-11-08T13:17:13Z")

</div>


