user admin : user management pb

230 views
Skip to first unread message

bsrm

unread,
Dec 26, 2011, 12:13:24 PM12/26/11
to sonata-users
Hi,

i've setup the SonataUserBundle. i can create a user and when i try to
update it, i've the following error :

Notice: Undefined property: Brickstorm\ParliamentBundle\Admin
\CitizenAdmin::$userManager in /homez.307/amndrc/www/__ac/vendor/
bundles/Sonata/UserBundle/Admin/Entity/UserAdmin.php line 83

i've not created the ApplicationSonataUserBundle since i've understood
that it's only done to keep the User in the same namespace. my user is
a another bundle and called Citizen.

any idea ?
i'm stuck on this since a few days...

thank you !

Benoît

Matthias Gutjahr

unread,
Dec 27, 2011, 5:36:40 AM12/27/11
to sonata-users
I can confirm this problem. You can try this workaround:

Add a property to Sonata\UserBundle\Admin\Entity\UserAdmin and edit
the method getUserManager() like this:

class UserAdmin extends Admin
{
protected $userManager;
[...]
public function getUserManager()
{
if (!$this->userManager) {
$this->userManager = $this->configurationPool-
>getContainer()->get('fos_user.user_manager');
}
return $this->userManager;
}
}

This is only a temporary workaround, but it works for me. Please
report back if it works for you, too!

Regards
- Matthias

bsrm

unread,
Dec 27, 2011, 11:39:34 AM12/27/11
to sonata-users
works fine !

thanks

Benoît
Reply all
Reply to author
Forward
0 new messages