This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get password for mapped => false | |
$pass = $this->getForm()->get('password')->getData(); | |
//Get password for mapped => true | |
$pass = $this->getForm()->get('password')->getData(); | |
$pass = $this->getForm()->get('password')->getData(); | |
if ($pass !== null) { | |
$object->setPlainPassword($pass); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if form is mapped => false; | |
$img = $form->get('img')->getData(); | |
//if form is mapped => true | |
$img = $user->getImg(); | |
if ($img !== NULL) { | |
// Generate a unique name for the file before saving it | |
$fileName = md5(uniqid()) . '.' . $img->getExtension(); |
NewerOlder