Yii-user extension blows up

Installed yii-user, trying to login and getting this:

"The table "{{users}}" for active record class "User" cannot be found in the database."

Digged deeper and found file ./modules/user/UserModule.php where table name is defined as:

public $tableUsers = ‘{{users}}’;

Am I suppose to replace ‘{{users}}’ value manually?

Gleb

i don’t think I used this particular ext, but you shouldn’t have to. I think it means that if you have a prefix set for your tables (ie: yiitbl_), Yii will automatically add that ie: yiitbl_user … etc

did you create the necessary database tables?

–i

Yes, I imported .sql and tbl_users table is in place.

It looks like no one replaced "{{users}}" string with actual table name?

Granted - I have my own ept_users in there as well, but that shouldn’t matter in this specific case… ?

so the tables in the yii-user ext are called like tbl_TABLE_NAME? then you most likely have to set your prefix in your app to be "tbl_"

http://www.yiiframework.com/doc/guide/1.1/en/database.dao#using-table-prefix

–i

Thanks!

I fixed it by:

Adding ‘tablePrefix’ => ‘xxx_’ to ‘db’ => array (…)

replacing tbl_ with my xxx_ in supplied .mysql.sql file (before importing it into my DB)

Gleb

it is also possible to set the tabelnames in your config main.php

I do it so:




'modules'=>array(

	'user'=>array(

		  'tableUsers'=>'user',

		  'tableProfiles'=>'profile',

		  'tableProfileFields'=>'profile_field',

		),



[size=2][color="#006400"]/* moved to extensions forum */[/color][/size]