Closed ghost closed 8 years ago
Ok I messed up my bjyauth config file and the role/identity providers. So I guess it had two roles/identity providers which were in conflict or something. It looks like this now :
'identity_provider' => 'BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider',
'role_providers' => array(
'BjyAuthorize\Provider\Role\ObjectRepositoryProvider' => array(
'object_manager' => 'doctrine.entitymanager.orm_default',
'role_entity_class' => 'LMS\Model\Role',
),
),
(found in zfcuserdoctrineorm module.config.php)
Hi, I don't understand what is happening in my application which runes with these modules :
I have 3 roles defined in my database:
The user table is well set with ORM:
With its getter and setter.
When I register a new account, the account appears in the database. In my Module.php I have a listener attached to ''register.post" to set a default role for my user like this :
So this is what happens :
When I create the FIRST user, he appears in the DB, the listener receives the event and creates a new row in user_role_linker which corresponds to what I'm doing in PHP. BUT the role given to the user is the role number 3 (admin) and not the number 2 (user). Even when I signout/sign in, his role remains the number 3.
When I create the second user his role is number 2.
AND the 3rd user has no role set in the application although his entry in user_role_linker is set to the role number 2.
I would be happy if someone could point out my mistake.
Thank you.