Variable with the 'logged in' user
Auteur : Capon P.
Visité 3034,
Followers 3,
Partagé 0
Hello, can I get a (php)variable with the 'logged in' user in order to add it to a mysql database for logging purposes?
My scenario: a user logs in to protected area. The moment (s)he clicks on a downloadlink the username + clicked link is written to a mysql databas
Thanks for your suggestions
Posté le
Hello Capon,
Unfortunately I cannot help you with the use of custom code, but if you have any doubts or issues on how to add them in the pages you made with WebSite X5 youcan ask me anytime.
To get the variable of the logged username you can use following code:
<?php
$pa = new imPrivateArea();
$user = $pa->who_is_logged();
echo $user['username'];
?>
Please feel free to write back if you need more information.
Auteur
Hi Claudio, this works perfectly!
Are User/Group - Remark / Password (from login management) also stored in a variable and can I get these in a way? Is the there a description all used php-variables? I could use this for future projects.
thanks for the quick anc clear responses. I really like the software and will be making some suggestions for extra functionality.
Hello Capon,
The other variables you can use are the following instead of ['username']:
These other fields unfortunately cannot be accessed form the variables.
Many thanks!