WebSite X5Help Center

 
Vagn M.
Vagn M.
User

How to find user information in Website X5  en

Автор: Vagn M.
Просмотрено 99, Подписчики 1, Размещенный 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

Размещено
2 Ответы - 1 Полезно - 1 Корректно
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

Читать больше
Размещено От Axel  
Vagn M.
Vagn M.
User
Автор

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

Читать больше
Размещено От Vagn M.