This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » User management plugins » [SOLVED] executepassword and overriding sfGuardAuth methods
[SOLVED] executepassword and overriding sfGuardAuth methods [message #59168] Thu, 21 August 2008 08:20 Go to next message
bstoppel  is currently offline bstoppel
Messages: 55
Registered: February 2006
Location: Lawrence, KS
Member
I am working on my own implementation of executePassword for the sfGuard plugin to make the request password link functional. This question is about best practices.

Which is better approach 1 or 2?

Approach 1

Implement the executePassword method in the action class within the plugin directory located at

sfProjectName/plugins/sfGuardPlugin/modules/sfGuardAuth/acti ons/actions.class.php

Approach 2

Initialize my own sfGuardAuth modules using

symfony init-module <APPNAME> sfGuardAuth

Alter the resulting actions.class.php file to extend BasesfGuardAuthActions instead of sfActions.

Implement executePassword.

Additional Questions

If I use the first approach will upgrading sfGuard in the future overwrite my work?

I guess the best practice for sfGuard would be a general answer for all plugins. Is that correct?

Thanks.

[Updated on: Sat, 23 August 2008 10:17]

Re: executepassword and overriding sfGuardAuth methods [message #59323 is a reply to message #59168 ] Sat, 23 August 2008 10:16 Go to previous messageGo to next message
bstoppel  is currently offline bstoppel
Messages: 55
Registered: February 2006
Location: Lawrence, KS
Member
As usual the documentation answers my question. I did a few different Google searches the other night, and the documentation didn't come up on the first couple of pages in the search results.

http://www.symfony-project.org/book/1_0/17-Extending-Symfony #Customizing%20a%20Plug-In%20for%20an%20Application

The answer is nuanced. In this case, since the action is to be overridden, solution 1 is more appropriate, which is what I have been doing, whew! Although there was no mention of whether or not the actions.class.php file is overridden when upgrading the plugin. I guess I will just hope that it is not and keep backups. Smile

Re: [SOLVED] executepassword and overriding sfGuardAuth methods [message #59324 is a reply to message #59168 ] Sat, 23 August 2008 11:22 Go to previous message
mosez  is currently offline mosez
Messages: 28
Registered: May 2008
Location: Nuremberg
Junior Member

Hi bstoppel,

if you are building your onw module it is the best solution. Build a module on app/appname/modules/sfGuarAuth, there you can add an actions class, extend it from the sfGuarAuth module action on plugins folder.

On your own module folder you can overwrite the templates for login and secured page too.
Previous Topic:more than one table for profile (sfGuard)
Next Topic:Disable Generator
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software