How can i pass the userid (of logged in user) to the database viewer component on the same page ?
Автор: Spring Produkties
Просмотрено 651,
Подписчики 1,
Размещенный 0
situation :
- we have page with the USER ORDERS component showing the orders of the logged in user (users have registered earlier through the automatic registration method of X5 PRO)
- on the same page we have the DATABASE VIEWER component getting data from a MYSQL database
but we should be able to filter the table data of the MYSQL-database, for the logged in user (the table contains the data of all users of course)
so how can we pass the userID (of logged in user) to the DATABASE VIEWER component on the same page please ?
thanks in advance for your help
Yuliya
Spring Produkties
Размещено
To my best knowladge x5 can't do this standard.
Автор
indeed, we are aware about the fact that X5 can not standard, but how can we do it through PHP e.g. ?
(It > En) ... in the page, (which must have a .php extension), paste this code into an HTML Code Object:
<?php $pa = Configuration::getPrivateArea(); $user = $pa->whoIsLogged(); echo "Benvenuto".$user['realname']; ?>
>> source: https://helpcenter.websitex5.com/ru/post/159381#comment6
.
ciao
.
Автор
@KolAsim : thanks that helps us one step ahead. The next step is to pass to the database viewer object to make the right filter. How can we do that please?
best regards,
Yuliya
... I do not know; ... with that code, each user will see their name on their own private page ...
ciao
.