News:

Join the Facebook Fan Page.

Main Menu

Login System

Started by Brett Patterson, October 10, 2004, 05:41:05 PM

Previous topic - Next topic

Brett Patterson

I know that SMF is open source, and I love using it.  Now what I would like to do is to actually have my members be able to log in to my site, by using a generic login form (made by me) that will also log them into the forum.

I know 90% of this is easy.  I do know the following things:

1) The smf_members database will be used for the checking of usernames/passwords
2) I need to add an extra column for whether or not they're allowed in certain areas.
3) A cookie needs to be placed on the computer that follows through to the forum and back
4) A logout needs to destroy the cookie and actually log them out

So my question is to you writers of great software:
How would I go about doing this?  I've looked at the source.... and needless to say I'm lost.  I don't want to rewrite your code, rather adapt it.  I did notice that the page checks for 'sa' to be set.  I don't know how you coded it, or where things are, so if someone would be willing to give a fairly detailed lay-mans description of what I need to do, that would be great.

Thanks for the help.

~Brett

MrCue

include_once('/path/to/smf/SSI.php');

And then where you want the login form
ssi_login(http://www.url_to_return_to.com);

Would that do?

Alternativley, you can set $_SESSION['login_url'] in your page then write your own login form with the same details as the SMF login form
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

Brett Patterson

Your second option is what I was looking more at.

What would I set the session variable as?

and would I just check for the session at the beginning of all my "locked" pages?

Thanks for the help.

~Brett

What if I wanted to add functionality as to tell whether or not they are a real member of the group (designated by the group on the Forum that they are apart of).  How would I go about including that?

Thanks.

Advertisement: