Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB error when overwriting table names #213

Open
neuronet77 opened this issue Mar 29, 2020 · 0 comments
Open

DB error when overwriting table names #213

neuronet77 opened this issue Mar 29, 2020 · 0 comments

Comments

@neuronet77
Copy link

Module config in web.php:

` 'modules' => [

    'user-management' => [
        'controllerMap'         => [
            'user' => 'app\controllers\UserController',
        ],
        'class'                 => 'webvimark\modules\UserManagement\UserManagementModule',
        'enableRegistration'    => false,
        'passwordRegexp'        => '^\S*(?=\S{8,})(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])\S*$^',
        'on beforeAction'       => function (yii\base\ActionEvent $event) {
            if ($event->action->uniqueId == 'user-management/auth/login') {
                $event->action->controller->layout = 'loginLayout.php';
            };
        },
        'user_table'            => 'ea_user',
        'user_visit_log_table'  => 'ea_user_visit_log',
        'auth_item_table'       => 'ea_auth_item',
        'auth_item_child_table' => 'ea_auth_item_child',
        'auth_item_group_table' => 'ea_auth_item_group',
        'auth_assignment_table' => 'ea_auth_assignment',
        'auth_rule_table'       => 'ea_auth_rule'
    ],
],

`

Upon login I get the following error message:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.auth_assignment' doesn't exist The SQL being executed was: SELECT b.* FROM auth_assignment a, auth_item b WHERE (a.item_name=b.name) AND (a.user_id='1') AND (b.type=1)

It gets triggered in

\vendor\webvimark\module-user-management\models\rbacDB\Role.php Line 23

return $dbManager->getRolesByUser($userId);

It seems like the custom table names are not getting handed over to the

yii\rbac\DbManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant