Created
November 25, 2013 16:18
-
-
Save grekpg/7643935 to your computer and use it in GitHub Desktop.
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
i setup fosuser - witchout any modifications - from manual : https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md | |
and have error when i try login or create user (when i submit form) | |
The field 'usernameCanonical' is not mapped by Doctrine, so it cannot be validated for uniqueness. | |
#config | |
fos_user: | |
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' | |
firewall_name: main | |
user_class: Miejsce\UserBundle\Entity\User | |
<?php | |
// src/Miejsce/UserBundle/Entity/User.php | |
namespace Miejsce\UserBundle\Entity; | |
use FOS\UserBundle\Model\User as BaseUser; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="fos_user") | |
*/ | |
class User extends BaseUser | |
{ | |
/** | |
* @ORM\Id | |
* @ORM\Column(type="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
protected $id; | |
public function __construct() | |
{ | |
parent::__construct(); | |
// your own logic | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment