开发者

how can i change password and confirm register in sfGuardDoctrinePlugin?

I learn to user sfGuardDoctrinePlugin, but i don't know yet where i can find user control panel and change password? Second problem - how can I do to when new user sign up he had to confirm via e-mail ac开发者_如何学Gocount and then is_active database = 1.

thanks for help!

edit:

i found [b]sfGuardChangePasswordTask.class.php[/b], so i must give a call to change password, but how?


For changing user passwords, you have two options: either create a standard Symfony admin backend (http://www.symfony-project.org/jobeet/1_4/Doctrine/en/12) or create your own "control panel" from scratch where you can change things. The passwords are stored as hashes so you should use the sfDoctrineGuardPlugin methods for making changes, such as $user->save().

For the email confirmation, you'll need to build this yourself. So I'd probably start by generating a unique hash (associated with the given sfGuardUser with active = 0) which is then emailed to the user. When the user clicks on the link, you check the hash and set active = 1.

Anything with the word "Task" in it are generally meant to be run from the command line or as Cron jobs so you shouldn't be looking at those for the normal running of your application.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜