allow users to change their own info

326 Views Asked by At

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 ?

2

There are 2 best solutions below

0
On BEST ANSWER

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.

0
On

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