ajaykau / yii-user

Automatically exported from code.google.com/p/yii-user
0 stars 0 forks source link

yii-user assumes tablePrefix is set. table names are empy otherwise and exception is thrown #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
good apps should not make assumptions, they should set config as necessary.

What steps will reproduce the problem?
1. create new yii web app
2. follow given installation instructions for yii-user
3.

What is the expected output? What do you see instead?
CDbException

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

What version of the product are you using? On what operating system?
yii 1.1.8

Please provide any additional information below.

changing the return values to the correct strings allowed yii-user module to 
work: (did the same for other tables used by yii-user)

    public function tableName()
    {
        //return Yii::app()->getModule('user')->tableUsers;
        return 'tbl_users';
    }

Original issue reported on code.google.com by blevy...@gmail.com on 19 Nov 2011 at 5:52

GoogleCodeExporter commented 9 years ago
Add DB prefix to config

'db'=>array(
    ...
    'tablePrefix' => 'tbl_'
),

Original comment by mish...@gmail.com on 21 Nov 2011 at 8:51