user admin : user management pb

230 visualizações
Pular para a primeira mensagem não lida

bsrm

não lida,
26 de dez. de 2011, 12:13:2426/12/2011
para 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

não lida,
27 de dez. de 2011, 05:36:4027/12/2011
para 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

não lida,
27 de dez. de 2011, 11:39:3427/12/2011
para sonata-users
works fine !

thanks

Benoît
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem