Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF2 - FOSUserBundle - Ability to drop username fields #45

Open
phillipsnick opened this issue Nov 9, 2014 · 3 comments
Open

SF2 - FOSUserBundle - Ability to drop username fields #45

phillipsnick opened this issue Nov 9, 2014 · 3 comments

Comments

@phillipsnick
Copy link
Owner

Potential hack found here FriendsOfSymfony/FOSUserBundle#555 (comment)

Some details on using the event listeners here https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/controller_events.md

@phillipsnick
Copy link
Owner Author

As username can't be null a quick fix has been added to the user entity

    public function setEmail($email)
    {
        if (is_null($this->getUsername())) {
            $this->setUsername(uniqid());
        }

        return parent::setEmail($email);
    }

phillipsnick added a commit that referenced this issue Nov 9, 2014
Basic implmentation of FOSUserBundle and temp fix for #45
@phillipsnick
Copy link
Owner Author

Also investigate dropping from sonata table
See about overriding vendor/sonata-project/user-bundle/Admin/Entity/UserAdmin.php

@phillipsnick
Copy link
Owner Author

phillipsnick added a commit that referenced this issue Nov 10, 2014
Removing username fields from admin, still a WIP #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant