-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Extending the admin User entity 3.2.*@dev #484
Extending the admin User entity 3.2.*@dev #484
Conversation
Can you check if the parameter for the custom user class is defined like this? https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/master/src/Kunstmaan/UserManagementBundle/Controller/UsersController.php#L67 Can you also post your SandBox\WebsiteBundle\Form\UserType? Strange that it doesn't find the class. The method getFormTypeClass() should indeed be public, as in the default User class: https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/master/src/Kunstmaan/AdminBundle/Entity/User.php |
here is code from my config.yml
and the user type class namespace Sandbox\WebsiteBundle\Form; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class UserType extends \Kunstmaan\AdminBundle\Form\UserType{ /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name'); parent::buildForm($builder, $options); } /** * {@inheritdoc} */ public function getName() { return 'markmedia_user'; } /** * {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { parent::setDefaultOptions($resolver); } } |
fix symfony dependency
ccb976e
to
007d45a
Compare
hmm, looks all ok, maybe you have a folder named "form" instead of "Form" and you are using OSX? :) |
@krispypen |
Extending the admin User entity 3.2.*@dev
also it is not working only on /admin/settings/users/ page. |
Any more help with this one? We cannot manage users at the moment. |
I was having a similar problem with the old admin users showing up on the settings page, instead of my custom, extended user entities. In the end, the problem was that I forgot to include this method in my custom UserAdminListConfigurator:
When I added the getBundleName() method and returned my bundle name, everything worked correctly. I'm just leaving this here in case anybody in the future runs into a similar problem. |
I have followed all the steps of https://bundles.kunstmaan.be/news/extending-the-admin-user-entity, and checked that the getBundleName() function is present, but still the old admin users are showing up in my settings page. Everything else is working fine, but the new users just don't show up. |
Hello,
I've updated kunstmaan bundles from 3.0 to 3.2.*@dev.
all works great but i have a problem with custom user entity.
i have extended the original entity by this article:
but in new version i have some errors:
1 on user page it tries to show entities from original db table
2 on add/edit i have this error
and if i change the protected method to public i get
Did you forget a "use" statement for "Kunstmaan\AdminBundle\Form\UserType"?
my method :
that file with that namespace exist(and it worked in prev version)
how can i fix this?