Login Recognition Login Recognition
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Login Recognition

Started by dnadan, June 18, 2007, 06:30:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dnadan

I'm looking for a way to check for if a user is logged in on a non-coppermine site.  I.e. I want to use a php script "require" to check if the username and password are set in the cookie.  But I'm not sure how to get that info out.

So my end result i'm looking for is a page that loads and using php will say something like "please login to coppermine to view this page" or else if they are logged in it will show the content. 

I hope that made sense what I'm looking for.  Thanks in advance for anyone who has any suggestions, let me know if I can clarify better

Sami

It would better if you tell us what are you really want to do with that external page
‍I don't answer to PM with support question
Please post your issue to related board

dnadan

Its a family web page with some personal content on it.  So there is a general welcome page for all.  But Then when they log in they can access other pages with personal content and other things.  One of the pages links to coppermine to see photos.  But I don't want them to have to log in again on the coppermine page, but I also don't want to turn off passwords on coppermine because I don't want someone to see pictures on coppermine unless they have logged in.

hope that helps, let me know if I need to clarify.  Ive looked around in the forums and seen things about miniCMS or phpNUKE as portal systems, but phpNUKE is beyond me, and I installed miniCMS and I can't figure out how to do much with that.

So any help or any pointing in the right direction would help a ton.  Thanks again

dnadan

I guess what I'm really looking for is a way to make my non-coppermine pages read the cookie set by coppermine.  So if someone can help me figure out how to parse out the username and password from the cookie so I can check them, then I think I can do the rest.  Thanks

Nibbler

Username and password are not stored in the cookie for security reasons. You'd need to read the session id from the cookie and look it up in the database to see if it is valid. See how it works in bridge/coppermine.inc.php