Topic: external database authentication plugin

hi,

I have modified the punbb external auth ext to work with latest 1.3.2 series.

If someone needs it, you can download it from

http://himanshu.asia/punbb-external-authentication/

have a nice day.

2 (edited by Roz 2009-01-29 01:42)

Re: external database authentication plugin

Thanks for the extension.  I have got this working on a php mysql existing external database.

Had to change this:

// Modify this function if necessary. It should return true if $entered_pass (the password entered via POST) matches // the user's password and false otherwise.
function is_valid_password($entered_pass, $user_data) {
    global $ext_password_column;

    return $entered_pass === $user_data[$ext_password_column]; }

last line to:

return md5($entered_pass) === $user_data[$ext_password_column];

I'm working on changing the profile settings to keep it inline with the external database.  So far I have changed the change password and change email settings.  Here is the profile.php file (saved as txt) - just need to replace the fake urls with your own for anyone else interested in doing this.
http://www.glutenawareness.org.nz/pun13 … rofile.txt

//@Roz: use the [ code] BBCode

3

Re: external database authentication plugin

Okay, I have completed the changes to PunBB files so that all the Register, Change Password, Lost Password and Change E-mail point to the external member database access files.  I have replaced all these URLS in these files with http://yourURLhere.  Hopefully I have zipped and uploaded them correctly this time, and I've done it to our Computer website:
http://www.computercave.co.nz/punBBfiles4extauth.rar

4

Re: external database authentication plugin

I'm trying to do the same.  I installed the extension but now I can not log into PunBB.  What type of encryption should the passwords be stored in?

Any help is appreciated as I'm completely stuck now.

5

Re: external database authentication plugin

I had that problem too until I changed the last line as above.  Have you tried that or adding your password encryption type in front of the return - in our case md5.

6

Re: external database authentication plugin

I got it working!  Appears that I needed to have a column in the database called id.  Is anyone working on a register page replacement?

Finally, my reason for the external database is to try to only have one login for both the website and the forum.  That is now happening as both Apache and PunBB are now using the same external database.  However I'd like to take it a step further so that once you log in via Apache you are also logged into the forum.  From what I read this is going to require that a cookie be set so that PunBB sees you are already authenticated.  Anyone have any pointers as to how to do this?

Thanks!
Dana

Re: external database authentication plugin

hi dana,

i have already done that too. you will have to write an extenstion that modifies fn_cookie_login_fetch_cookie hook.

You will have to supply fake cookie information so that punbb thinks that user is already logged in.

I have instlled this plugin in my website at http://zixini.com/. after registering, visit the forum and you will see that you are automatically logged in. no need to login again in the forum.

and please dont say anything bad about the site as i am the only one whos writing the code in my spare time, and i  already know that it looks pretty bad.. so please dont tell me that too big_smile

if anyone needs the code, i will gladly post the code too.

8

Re: external database authentication plugin

himanshu wrote:

if anyone needs the code, i will gladly post the code too.

Yes, please!

9

Re: external database authentication plugin

Please post it! And thanks for your help.

10

Re: external database authentication plugin

himanshu or Roz,

Either of you still around?  Any luck with posting the cookie code?

11

Re: external database authentication plugin

I haven't heard anything.