0

I'm creating my own blog engine to learn Symfony, and I have a question :

How can I let users edit their password, name, and Profile (embedded form) ?

I tried creating an admin-module on sfGuardUser, and hiding fields like "permisions" and "groups", but that form erases the permissions on saving :(

Any ideas ?

4

2 回答 2

0

I created an admin module based on sfGuardUser,

then I created my own form :

class mysfGuardUserAdminForm extends sfGuardRegisterForm

And called it in generator.yml :

  form:

    class: mySfGuardUserAdminForm

    display:

      "User": [email_address, username, password, password_again, Profile]

That + a function checking the user's rights, so that he cannot edit someone else's profile.

于 2011-02-08T13:21:43.860 回答
0

Try sfApply plugin. It has a form for sign up and a form for editing user data, including password, email and whatever you add.

于 2011-02-09T14:11:36.683 回答