Own pages

If you aren't speaking german, you can ask for support or post your request here.
Antworten
mbs
Beiträge: 21
Registriert: 19. Okt 2013, 17:34

Own pages

Beitrag von mbs »

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
weissst
Developer
Beiträge: 342
Registriert: 4. Nov 2011, 18:07
Wohnort: 54xx

Re: Own pages

Beitrag von weissst »

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
Benutzeravatar
Thomas-RCV
Former team member
Beiträge: 786
Registriert: 1. Aug 2011, 15:06

Re: Own pages

Beitrag von Thomas-RCV »

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:

Code: Alles auswählen

if ($gValidLogin)
{
     // Code
}
Best,
Thomas
David70
Beiträge: 1
Registriert: 13. Okt 2014, 14:55

Re: Own pages

Beitrag von David70 »

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
Antworten