1 (edited by Woppe 2003-08-23 14:04)

Topic: What do i need for the login?

Hello!

I'm trying to combine my login-system with punbb's login-system so the visitors don't have to login twice. But I don't know what code I have to copy from login.php. Can you please tell me? I hope I don't need all the code from
"if (isset($_POST['form_sent']) && $action == 'in')"

// Andreas

Re: What do i need for the login?

I do believe you need all the code between line 42 and line 68.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: What do i need for the login?

Hmmm... I allreay have a working login with sessions.
$_SESSION['sess_username'] is the username, and you use $cur_user['username'], aren't you?

So.. Maybe all I need to do is add some rows php with cinda...
$_SESSION['sess_user'] = $cur_user['username']
$_SESSION['status'] = $cur_user['status'] and so on?

In that case, what variables do I have to declare?

Hope you understand what I mean.
You know, I don't need to check if the password is OK and so on.

4

Re: What do i need for the login?

I'm trying to do it another way now..

But after this require, the site doesn't load anymore.

define('PUN', 1);
if (defined('PUN')){
echo "defined";
}
require '../forum/include/common.php';

As you see I have defined PUN, but it makes no sense.
I come to an "exit".

Do you know how I shall do to fix it?

Re: What do i need for the login?

You have to include config.php. What exit() do you stop at?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6

Re: What do i need for the login?

I really don't know what exit() I stop at.. I know that it is in common.php the problem is, so I echoed the row number before every exit in that file, but when i try to log in, it doesnt echo anything!

But do I really need common.php?
And.. Can it matter that my file index.php lies in another folder?

Re: What do i need for the login?

Have a look at this topic: http://punbb.org/forums/viewtopic.php?id=2508

"Programming is like sex: one mistake and you have to support it for the rest of your life."