Hi, is it possible for me to use my own pages using the admidio authentication and what code would i need to include in them to maintain login?
thanks
Own pages
Re: Own pages
hello mbs,
the easiest way - 1.) if you just need check for login - and 2.) your code is on same server-address
would be to check in all of your pages, if the session is still active and user is allowed to see your site...
this could be done with something like:
if(isset($_SESSION['username']))
{
code for logged-in users
}
else
{
code for logged-out users
}
code for all
in this case you have no update for session-time and also some other parts of security will not be OK, but if you want a secure way, you need to include at least:
require_once('../../system/common.php');
maybe also some other parts need to be there
I hope this help you to start with your development...
br
the easiest way - 1.) if you just need check for login - and 2.) your code is on same server-address
would be to check in all of your pages, if the session is still active and user is allowed to see your site...
this could be done with something like:
if(isset($_SESSION['username']))
{
code for logged-in users
}
else
{
code for logged-out users
}
code for all
in this case you have no update for session-time and also some other parts of security will not be OK, but if you want a secure way, you need to include at least:
require_once('../../system/common.php');
maybe also some other parts need to be there
I hope this help you to start with your development...
br
- Thomas-RCV
- Former team member
- Beiträge: 786
- Registriert: 1. Aug 2011, 15:06
Re: Own pages
Hi,
including the common.php, we provide the global variable $gValidLogin
So if you want running code only if user is logged in, you can do easily like this:
Best,
Thomas
including the common.php, we provide the global variable $gValidLogin
So if you want running code only if user is logged in, you can do easily like this:
Code: Alles auswählen
if ($gValidLogin)
{
// Code
}
Thomas
Re: Own pages
We develop and release Admidio in German and English. But we want to release Admidio in many language. So if your native language is not supported we invite you to translate Admidio in your language.
watson