Hi, I'm newbie in Modx and I'm working in a website developed on Revolution 2.1.3-pl.
The site has some non-modx tables designed for a particular module that allows to visitors to register in a website section for ask for tips/questions.
Now I need to display the user email if it logged, my question is, how can I make this and show it on the header of the site (a sql query perhaps?). If it not logged (or is not registered) display the message "Your not logged".
I have the following code tested on a snippet but that's just the beginning:
<?php
$link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$cookie_name = "user";
$cookie_value = $_POST["mail"];
setcookie($cookie_name, $cookie_value, time() + (60 * 30), "/"); // 5 min
//If user is on the questions section
if(strpos($link, '/tips-help/') !== false){
echo "Welcome";
echo "Your Email is: " .$_POST["mail"];
}
//If user is out of the questions section
else{
echo "You are out";
}
Any help would really appreaciated,
Regards.