File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ public function assign($role): bool
3535 $ roleKey = Config::get ('roles.key ' );
3636
3737 if (!($ this ->data [$ roleKey ] ?? null )) {
38- $ this ->db ->query ("ALTER TABLE users ADD COLUMN $ roleKey TEXT NOT NULL DEFAULT '[]' " )->execute ();
38+ $ this ->db ->query ("ALTER TABLE " . Config:: get ( ' db.table ' ) . " ADD COLUMN $ roleKey TEXT NOT NULL DEFAULT '[]' " )->execute ();
3939 }
4040
4141 try {
4242 $ this ->db
43- ->update (' users ' )
43+ ->update (Config:: get ( ' db.table ' ) )
4444 ->params ([
4545 $ roleKey => json_encode ($ this ->roles )
4646 ])
@@ -129,7 +129,7 @@ public function unassign($role): void
129129 $ this ->permissions = $ this ->getRolePermissions ($ this ->roles );
130130
131131 $ this ->db
132- ->update (' users ' )
132+ ->update (Config:: get ( ' db.table ' ) )
133133 ->params ([
134134 Config::get ('roles.key ' ) => json_encode ($ this ->roles )
135135 ])
You can’t perform that action at this time.
0 commit comments