This topic is locked

BeforeQueryList

8/30/2021 4:44:31 PM
PHPRunner General questions
Y
yasser136 author

hello
so my probleme i need to show list page but only data recorded by user of session
user1 can see only recorded he do
user2 can see only recorded he do
......
img alt

$strWhereClause = list.id_username = $_SESSION["UserName"]

.best regards

fhumanes 8/30/2021

Hello there:

I think your problem comes from the content of the $_SESSION["UserName"] variables because it does not have the user's "ID".

You can retrieve the user ID and the rest of the values using the Security API: https://xlinesoft.com/phprunner/docs/secapi_current_user_data.htm

Greetings,
fernando

HJB 8/30/2021

Proceed to SECURITY section inside PHPRunner and click on ADVANCED... to be able to view the popup window below.
Then choose relevant table on which you may want to have "users can see and edit their own data only" and you'r done.

img alt

Y
yasser136 author 8/30/2021

thanks a lot a will try