PDA

Click to See Complete Forum and Search --> : Auth and Smarty


McCain
Jun 18th, 2007, 03:49 PM
Does anyone know of a good auth lib that works well with Smarty? I had a look at Pear::Auth, but can't really figure out how to make it play nice with smarty because of how it uses the "loginFunction" to display a login form...

visualAd
Jun 19th, 2007, 04:14 PM
Why not extend the original Pear::Auth class and override the login function to use smarty?

McCain
Jun 20th, 2007, 05:01 AM
But why should the auth lib draw anything at all? I just want to write a <form> in my template where I want to have the login stuff.

visualAd
Jun 20th, 2007, 09:00 AM
So what is the problem?

McCain
Jun 20th, 2007, 02:24 PM
I just threw a glance at the docs and saw that they had that function echoing html tags. I'll have a closer look, maybe I can just make it an empty function that doesn't output anything and take care of the drawing of the login form myself...

visualAd
Jun 20th, 2007, 02:56 PM
Is the whole authentication process not separate from the output and display of the login form?

In any case you can use inheritance to modify the functionality of the base class and change any functions you wish.