thyseus / yii-user-management

a user management module collection for the yii framework
186 stars 122 forks source link

Fixed table references in sql #151

Open Neggia opened 10 years ago

Neggia commented 10 years ago

Hello, thanks for your great extension, keep the good work going! I found some query with fixed table reference (old line removed are commented, other was added): YumUser.php line 335 and below: .... $permissionTable =Yii::app()->getModule('role')->permissionTable;
$actionTable =Yii::app()->getModule('role')->actionTable; ... $sql = "select id, $actionTable.title from $permissionTable left join $actionTable on $actionTable.id = $permissionTable.action where type = 'role' and principal_id = {$role->id}"; // $sql = "select id, action.title from permission left join action on action.id = permission.action where type = 'role' and principal_id = {$role->id}"; ... $sql = "select id, $actionTable.title from $permissionTable left join $actionTable on $actionTable.id = $permissionTable.action where type = 'user' and principal_id = {$this->id}"; // $sql = "select id, action.title from permission left join action on action.id = permission.action where type = 'user' and principal_id = {$this->id}"; I saw more of these, I'll update when they'll come into my way, thank you