Hi All,
I've got the latest from the symfony-standard & UserBundle git
repositories, have gone through the instructions in
UserBundle\Resources\doc\index.rst and gotten things setup. However
I'm unable to create a new user.
When I go to [url]/user/new - out the form and click submit, I get
the error:
No encoder has been configured for account
"Application\uNapseBundle\Entity\User".
Searching through the index.rst doc, the only reference to 'encoder'
I could find was this chunk of configuration:
encoder:
algorithm: ~
encode_as_base64: ~
iterations: ~
Which I added to my app/config/config.yml - but this produced a fatal
error:
Fatal error: Uncaught exception 'InvalidArgumentException' with
message 'The parameter "fos_user.encoder.algorithm" must be defined.'
in [app_root]/vendor/symfony/src/Symfony/Component/DependencyInjection/
ParameterBag/ParameterBag.php
on line 77
I don't know what options I have, as far as what to set on these
configuration parameters. I brought this up in IRC and was told that I
shouldn't have to specify these settings, as the bundle does not use
the core encoder for this class but a custom one. However I don't know
enough about how UserBundle is implemented to do any troubleshooting
of my own, so I was hoping someone on the list could help me out.
Here is my User class.
<?php
namespace Application\uNapseBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
/**
* Application\uNapseBundle\Entity\User
*
* @orm:Table(name="user")
* @orm:Entity
*/
class User extends BaseUser
{
/**
* @orm:Id
* @orm:Column(type="integer")
* @orm:generatedValue(strategy="AUTO")
*/
protected $id;
/**
* @orm:ManyToMany(targetEntity="FOS\UserBundle\Entity
\DefaultGroup")
* @orm:JoinTable(name="fos_user_user_group",
* joinColumns={@orm:JoinColumn(name="user_id",
referencedColumnName="id")},
* inverseJoinColumns={@orm:JoinColumn(name="group_id",
referencedColumnName="id")}
* )
*/
protected $groups;
/**
* @var Application\uNapseBundle\Entity\ActivityLog
* @OneToMany(targetEntity="ActivityLog", mappedBy="user")
*
*/
private $activityLogEntries;
/**
* @var Application\uNapseBundle\Entity\Cloud
* @OneToMany(targetEntity="Cloud", mappedBy="user")
*
*/
private $cloudList;
/**
* @var Application\uNapseBundle\Entity\Instance
* @OneToMany(targetEntity="Instance", mappedBy="user")
*
*/
private $instanceList;
public function __construct()
{
$this->activityLogEntries = new
\Doctrine\Common\Collections\ArrayCollection();
$this->cloudList = new \Doctrine\Common\Collections
\ArrayCollection();
$this->instanceList = new
\Doctrine\Common\Collections\ArrayCollection();
$this->groups = new \Doctrine\Common\Collections
\ArrayCollection();
}
/**
* Returns a list of activity logs for this user
*
* @return Doctrine\Common\Collections\Collection
*/
public function getActivityLogEntries()
{
return $this->activityLogEntries;
}
// TODO : other mappings & getter/setter methods from tables
}
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en