Writing auth plug-in - recovering to original auth scheme

Discussion forum for MOD Writers regarding MOD Development.

Writing auth plug-in - recovering to original auth scheme

Postby abqdan » Sat May 30, 2009 5:42 pm

This is a real newbie mistake I know - can anyone help me out?

I'm trying to write an auth routine to work with my main website. I tried it out, and it failed part-way through. The trouble is now I'm stuck; I can't log back in to change the auth back to the DB (default) version, because it's trying to run my own auth code.

I have full access to the database, so is there some way I can reset the auth to the original version?

Also, what is the correct way to test an auth plug-in? Clearly I don't want to keep disabling myself when testing!

Any pointers would be REALLY appreciated! Thanks.
Dan
abqdan
Registered User
 
Posts: 4
Joined: Sat May 30, 2009 5:34 pm

Re: Writing auth plug-in - recovering to original auth scheme

Postby A_Jelly_Doughnut » Sat May 30, 2009 9:57 pm

You can run this query to reset to the standard authorization. YOu may need to delete /cache/data_global.php to force this to take effect.
Code: Select all
UPDATE phpbb_config SET config_value = 'db' WHERE config_name = 'auth_method'


As far as a way to test auth methods, you pretty well do need to enable them to test. You could manually manage sessions to log yourself in if needed (phpbb_sessions table, alter the session_user_id column to your admin account). I've used that method in the past.
A_Jelly_Doughnut - phpBB Development Team member
MOD Database
"When true simplicity is gained, to bow and to bend we will not be ashamed" ~ Simple Gifts
User avatar
A_Jelly_Doughnut
Development Team Member
Development Team Member
 
Posts: 33304
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run

Re: Writing auth plug-in - recovering to original auth scheme

Postby abqdan » Sat Jun 06, 2009 4:33 pm

Thanks! That was a real help!
abqdan
Registered User
 
Posts: 4
Joined: Sat May 30, 2009 5:34 pm


Return to [3.0.x] MOD Writers Discussion

Who is online

Users browsing this forum: disconnect, Noxwizard and 15 guests