symfony - Dealing with FOSUserBundle PlainPassword field -


i've created user custom class in bundle. inherits baseuser class of fosuserbundle.

in class, i've defined several attributes entities of bundle, adress, avis etc.

i have defined formtype of forms data_class user. allows me retrieve interesting user information username (!) , displaying in forms. when validate forms asks me fill plainpassword field of user class mandatory attribute.

first wanted retrieve password database fill in form before displaying seems impossible security measure. i've tried stock in session (ugly know) after registration seems not possible force form data value (surely because password type field)...

so question : ?

but purpose of retrieving it? want modify of user's data username or email? remember can have /profile 'module' in fosuser bundle, used modifing example username , email. changing password have separate 'module' change password (i don't remember path). maybe that's looking for? of course way user can edit own data. these modules ready use deafault (you have provide routing them).

if want example, admin modifies other user's data can interesting you: in case of password, take @ column in db called 'salt', used encoding password in db. if try save password in db without salting won't work - think if want change password in db custom action - have set plain password , automatically encoded.

if want fill form's fields default read forms in symfony, fields types , additional features , remember password field require individuall approach.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -