Hello All,
I am trying to determine if someone has logged into moodle on another page outside of moodle.
This extra page is also on a different web server.
I have tried:
require('path_to/config.php');
if(isloggedin())
{
#user is logged in code
echo ('logged in');
}
else
{
#user is NOT logged in code
echo ('NOT logged in');
}
I have tried different variations of the require page:
require('http://our_domain/config.php');
require('our_domain/config.php');
require('\\physical_server_path\path\wwwroot\config.php');
None of which work??
If i put the extra page on the same server as moodle and on the same level as the config file the following does work:
require('config.php');
if(isloggedin())
{
#user is logged in code
echo ('logged in');
}
else
{
#user is NOT logged in code
echo ('NOT logged in');
}
Can I not use it across servers?
Many thanks