Authentication autologin_method

Discussion forum for MOD Writers regarding MOD Development.
Locked
acctman
Registered User
Posts: 103
Joined: Thu Feb 09, 2006 5:48 pm

Authentication autologin_method

Post by acctman »

I'm reading the Auth Plugin info at http://wiki.phpbb.com/Authentication_plugins but it's just not making any sense to me. Its very vague and it assumes that you already know what to put into the files. Is there an example code anywhere.

What i'm trying to do is, us "my existing site db" and auto login user into phpbb3 and also create auto if it does not exist. I already know how to get the username/userid/pass/ ect... all in session form from my existing site and database. i just need to know how to send the required informate to phpbb3 so it can auto login the user and or create an acct if needed.

acctman
Registered User
Posts: 103
Joined: Thu Feb 09, 2006 5:48 pm

Re: Authentication autologin_method

Post by acctman »

To add a new authentication method (let’s call it foo), you have to create the source file auth_method.php (auth_foo.php in our example) in the includes/auth/ directory. This source file should provide a number of functions.

----What functions?

The only mandatory function in the authentication module is the login_method() function (login_foo() in our example). All other methods are optional.

----i put login_auto(); and saved the file. And i received and undefined error

i understand that for anyone who helped create phpbb or regular creates mods this would seem simple. but the explaination / example (if that) is extremely vague and assumes the reader already knows what to put inside the file. I do understand that every site login is different but there is no example to go by...

any help with examples would be appericated

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Authentication autologin_method

Post by A_Jelly_Doughnut »

auth_foo() should be the only method you need. Can you specify the exact error message?

I don't know of any complete examples available other than those that ship with phpBB. Most people create these layers for their own sites and don't release them.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

acctman
Registered User
Posts: 103
Joined: Thu Feb 09, 2006 5:48 pm

Re: Authentication autologin_method

Post by acctman »

A_Jelly_Doughnut wrote:auth_foo() should be the only method you need. Can you specify the exact error message?

I don't know of any complete examples available other than those that ship with phpBB. Most people create these layers for their own sites and don't release them.
i search all night online and found a blog where someone was nice enough to post a complete example. i'm receive an error though (see below) do I have to install phpbb3 into the same database that has my existing site tables? Its looking for phpbb3 in my ratemy_rater db, I have phpbb installed in its own db. I'm assuming the easiest fix would be to just install/move phpbb into the ratemy_rater db so the Authen plugin will work.

General Error
SQL ERROR [ mysql4 ]
Table 'ratemy_rater.phpbb_forums' doesn't exist [1146]
An SQL error occurred while fetching this page.

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Authentication autologin_method

Post by A_Jelly_Doughnut »

You can force MySQL to look at your other database.

Code: Select all

SELECT * FROM dbname.tablename
I am however, unsure whether making this change would be easier than moving your phpBB into your raters database.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

Locked

Return to “[3.0.x] MOD Writers Discussion”