gesman
(Gesman)
August 24, 2011, 5:47pm
1
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
imehesz
(Imehesz)
August 24, 2011, 5:55pm
2
gesman:
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
gesman
(Gesman)
August 24, 2011, 6:01pm
3
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… ?
imehesz
(Imehesz)
August 24, 2011, 8:23pm
4
gesman:
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
gesman
(Gesman)
August 24, 2011, 8:34pm
5
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
klaus66
(Klaus Mergen)
December 9, 2011, 8:39pm
6
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',
),
jacmoe
(Jacob Moen)
December 9, 2011, 8:55pm
7
[size=2][color="#006400 "]/* moved to extensions forum */[/color] [/size]