Advanced search  

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

Pages: [1]   Go Down

Author Topic: Login Recognition  (Read 2805 times)

0 Members and 1 Guest are viewing this topic.

dnadan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Login Recognition
« on: June 18, 2007, 06:30:31 pm »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Login Recognition
« Reply #1 on: June 18, 2007, 06:55:55 pm »

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

dnadan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Login Recognition
« Reply #2 on: June 19, 2007, 01:02:07 am »

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
Logged

dnadan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Login Recognition
« Reply #3 on: June 19, 2007, 01:51:27 am »

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
Logged

Nibbler

  • Guest
Re: Login Recognition
« Reply #4 on: June 19, 2007, 01:54:37 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.