WebSite X5Help Center

 
Vagn M.
Vagn M.
User

How to find user information in Website X5  en

Autore: Vagn M.
Visite 97, Followers 1, Condiviso 0  

I am trying to find and display the user information related to the user logged in to Website X5. The php-code used looks like this:

<?php
require"res/x5engine.php";
$pa = Configuration::getPrivateArea();
$user = $pa->whoIsLogged();
echo"Username: ".$user['username'];
echo"uid: ".$user['uid'];
echo"email: ".$user['email'];
echo"Firstname: ".$user['firstname'];
echo"Lastname: ".$user['lastname'];

Please view the attached file to see the result (or missing result).

Best Regards
Vagn Majland

Postato il
2 RISPOSTE - 1 UTILE - 1 CORRETTO
Axel  
Axel  
User

Hello Vagn

Into an HTML object this code is OK

Take Care, to work correctly the page where is this code nees to be private.... Does not works in other case

And the display is:

Hopt this helps

Axel

Leggi di più
Postato il da Axel  
Vagn M.
Vagn M.
User
Autore

Thank you Alex

I wasn't aware of that the "Set this page as Locked" should be marked.

Now it's working as expected thanks to you.

Best Regards
Vagn

Leggi di più
Postato il da Vagn M.