Jump to content

Recommended Posts

Posted (edited)

Hello together, 

today I got the idea to create a few PHP Applications on our VA Website, and I would like use the login system of the phpvms. That means, that I would like make a Query to look if the User is logged in or not. Has anyone an idea, how to create this function in PHP with Sessions, Cookies or something else?

Greetings,

Konrad

Edited by KonradP
  • 3 weeks later...
Posted
On 5/26/2018 at 9:03 PM, KonradP said:

Hello together, 

today I got the idea to create a few PHP Applications on our VA Website, and I would like use the login system of the phpvms. That means, that I would like make a Query to look if the User is logged in or not. Has anyone an idea, how to create this function in PHP with Sessions, Cookies or something else?

Greetings,

Konrad

Hey! 

I know how to do this, I infact created a webmail application for one of my clients which used this tech. Session's would be better than cookies, but Since the Codon.config.php already has a session_start(); tag, It would throw a warning every time someone tries to login to your application. 

Contact me on PM, I might be free for the next few days to help you out. 

Regards
 

  • Moderators
Posted

This is what I regularly use:

include_once '../core/codon.config.php';
if(Auth::LoggedIn()) {
	echo 'You are logged in';
} else {
	echo 'You are not logged in'l
}

Of course, you will have to update the include_once line in order to point to the path of your phpVMS core/codon.config.php according to the current directory of your web application.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...