WebSite X5Help Center

 
Spring Produkties
Spring Produkties
User

How can i pass the userid (of logged in user) to the database viewer component on the same page ?  nl

Autor: Spring Produkties
Besucht 663, Followers 1, Geteilt 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

Gepostet am
5 ANTWORTEN
Andre E
Andre E
Moderator

To my best knowladge x5 can't do this standard.

Mehr lesen
Gepostet am von Andre E
Spring Produkties
Spring Produkties
User
Autor

indeed, we are aware about the fact that X5 can not standard, but how can we do it through PHP e.g. ?  

Mehr lesen
Gepostet am von Spring Produkties
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Spring Produkties
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/de/post/159381#comment6

.

ciao

.

Mehr lesen
Gepostet am von  ‪ KolAsim ‪ ‪
Spring Produkties
Spring Produkties
User
Autor

@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

Mehr lesen
Gepostet am von Spring Produkties
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... I do not know; ... with that code, each user will see their name on their own private page ...

ciao

.

Mehr lesen
Gepostet am von  ‪ KolAsim ‪ ‪