Comments (9)
This is not an issue with the SonataAdminBundle. You need to define an userManager
property and inject the related service into the Admin.
from sonatauserbundle.
Ok, I see. Thanks for your reply!
from sonatauserbundle.
Sorry to bump this up after 2 years, but i had the same issue today.
Since the $userManager property is used in the code of Sonata\UserBundle\Admin\Model\UserAdmin (there is a getter and a setter for this property), the property itself should be declared too, as pointed by mattsches:
protected $userManager;
Then, the question is: should we force the user to configure the service injection (http://sonata-project.org/bundles/admin/master/doc/reference/saving_hooks.html) like this:
<service id="fos.user.admin.user" class="%fos.user.admin.user.class%">
<tag name="sonata.admin" manager_type="orm" group="fos_user" />
<argument />
<argument>%fos.user.admin.user.entity%</argument>
<argument />
<call method="setUserManager">
<argument type='service' id='fos_user.user_manager' />
</call>
</service>
...or should the UserAdmin class choose the fos_user.user_manager by default in the getter with mattsches' code ?
I think mattsches solution is much simpler.
from sonatauserbundle.
Ping
from sonatauserbundle.
@rande ^
from sonatauserbundle.
@Bladrak I actually sent the ping from @DerekRoth account ;)
from sonatauserbundle.
fixed
from sonatauserbundle.
@rande I ran into this bug today, and I'm using the ORM for managing users, while using the ODM to manage everything else. If you can point out which piece of code is in charge of this, I could have a look at it. I worked around my problem by injecting the manager.
from sonatauserbundle.
👍
from sonatauserbundle.
Related Issues (20)
- Use SensitiveParameter for password and others HOT 1
- The ROLE_PREVIOUS_ADMIN role is deprecated HOT 1
- SonataUserBundle does not register UserListener with doctrine_mongodb.odm.event_subscriber HOT 1
- SonataUserBundle validator.xml does not adapt to MongoDB use HOT 6
- Admin list does not have edit button
- To delete (wrong repository)
- Incorrect display acl privileges grid, when exists two admin entity with the same name (in other groups). HOT 3
- User creation HOT 1
- The profile link in `user_block.html.twig` is always displayed, even if user is not allowed to view the profile. HOT 1
- The login page fix the width of the logo image to 64px HOT 7
- The doctrine/collections requirement prevents installing on Symfony 6.2 HOT 5
- SonataUserBundle 5.6.0 changes to `BaseUser.mongodb.xml` break XML validation HOT 5
- `BaseUser.mongodb.xml` `boolean field `enabled` triggers a deprecation warning HOT 1
- Invalid type for path "security.role_hierarchy.providers.sonata_user_bundle" - Error on fresh install. HOT 2
- BaseUser.mongodb.xml broken in SonataUserBundle 5.6.1 HOT 2
- Role checkboxes are disabled when creating/editing a user HOT 3
- Deprecation: UserListener needs to be done as listener instead of subscriber HOT 2
- Deprecation: Returning a string from "getSalt()" without implementing the LegacyPasswordAuthenticatedUserInterface HOT 5
- Extend UserAdmin problem (bug?) HOT 6
- Add the ability to disable global_search HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonatauserbundle.