1 (edited by Rob 2004-03-16 18:37)

Topic: Password Help

Ok, heres what Im currently working on. I am porting a classifieds and image gallery to use with punBB and also woring on a portal for it. What I need to know is where/which file is the password in. You know, when you register, it goes in the SQL DBS. I need the code for it or tell me where its at so user wont have to register in the other mods Im working on. All I find is ref, to this:

if ($cookie['is_guest'] && $pun_config['p_guests_read'] == '0')
    message($lang_common['Login required']);

Please help..

EDIT: Would the following work?

$pun_root = './'; <-change to where the forum is?
require $pun_root.'include/common.php';


// If we are logged in, we shouldn't be here
if (!$cookie['is_guest'])
    header('Location: index.php');

Every time you think you've made it idiot proof, along comes a better idiot.

Re: Password Help

Do you mean the code to verify password at logon or verify that the user is online?

3 (edited by Rob 2004-03-17 04:55)

Re: Password Help

Let me see if I can simplify this... Ok, heres the issue, in my classifieds script there is a provision for Registering. (Name and pass). What I want to do is use the punBB registrating instead. Also, if someone is logged into the forums, then goes to the classifieds, the script looks to see if they are logged in (to the punBB). I hope that makes it easier to understand.

Both my classifieds and image gallery use the same registrating and database, so they intergrate easily. It would be easier to switch them over to punBB's though.

Thanks,
Rob

Every time you think you've made it idiot proof, along comes a better idiot.

4

Re: Password Help

Well, you've got several options there, then:
either get the user cookie from the forum and update it to your gallery's or whatever, or use the same cookie, or use a session that you associate to the cookie or just duplicate users and pass the login as a form (I do the latest with one site where the forum is on a quite different server, this way they remain totally independent).

What you propose belongs to scenario 2, with one small possible problem: any user who hasn't been registered at the forum does receive an is_guest=true cookie (so if you disable registering... the problem aggravates), but nothing prevents them from changing that manually.
In this case, I'd rather validate the userid received from the cookie agains the user database.