coolcsn / CsnAuthorization

Authorization module for Zend Framework 2
BSD 3-Clause "New" or "Revised" License
13 stars 15 forks source link

error! #1

Open ksrichard opened 10 years ago

ksrichard commented 10 years ago

hey I setup these modules( 'DoctrineModule', 'DoctrineORMModule', 'CsnUser', 'CsnAuthorization', 'CsnAclNavigation', 'CsnCms' ) and i got this error: Fatal error: Call to a member function getRole() on a non-object in /home/ksrichard/www/zend/food_manager/vendor/coolcsn/csn-authorization/src/CsnAuthorization/Module.php on line 53 what can i do?

coolcsn commented 10 years ago

Please, try to populate the tables in the database with some data. At least enter the roles in the "role" table. You can use the sample sql from CsnUser https://github.com/coolcsn/CsnUser/blob/master/data/SampleData.sql

coolcsn commented 10 years ago

Hello K.S.Richar.

Please, try to populate the tables in the database with some data. At least enter the roles in the "role" table. You can use the sample sql from CsnUser https://github.com/coolcsn/CsnUser/blob/master/data/SampleData.sql

On Wed, Oct 2, 2013 at 12:38 PM, K.S.Richard notifications@github.comwrote:

hey I setup these modules and i got this error: Fatal error: Call to a member function getRole() on a non-object in /home/ksrichard/www/zend/food_manager/vendor/coolcsn/csn-authorization/src/CsnAuthorization/Module.php on line 53 what can i do?

— Reply to this email directly or view it on GitHubhttps://github.com/coolcsn/CsnAuthorization/issues/1 .

revov commented 10 years ago

Make sure you have populated your database with the sample data (espessially the roles). Check if the user you are logged in as is assigned a proper role. Let us know if this resolves your problem. If you want to use all of the mentioned Csn modules, you may as well, take a look at the enhanced skeleton application which will eventually save you a lot of time configuring the modules.

dennis-fedco commented 10 years ago

Also, if you do have the data properly set in your tables, you may need to clear out the cookies (i.e. restart Zend Server), as was the case with me. Your last session may have remembered a previous but currently incorrect state.