I have installed FOSUserBundle and followed the example in this link: http://symfony.com/doc/current/bundles/FOSUserBundle/index.html and each time I try to login symfony shows me this exception:
Notice: Array to string conversion
500 Internal Server Error - ContextErrorException
So this is my class User that extneds from BaseUser:
namespace OCUserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use FOS\UserBundle\Model\User as BaseUser ;
/**
* User
*
* @ORM\Table(name="user")
* @ORM\Entity(repositoryClass="OCUserBundle\Repository\UserRepository")
*/
class User extends BaseUser
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
}
securit.yml:
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
main:
pattern: ^/
provider: fos_userbundle
form_login:
login_path: fos_user_security_login
check_path: fos_user_security_check
logout:
path: fos_user_security_logout
target: /platform
anonymous: true
and this is my routing.yml:
fos_user:
resource: "@FOSUserBundle/Resources/config/routing/all.xml"
and this is the table in my database:
image link
So what am I missing?