Frontend For Yii2 And Backend For Yii1 On A Project

Hi everybody!

I have a big issue that I hopy everybody can help me:

I have had a project on Yii1 before and until now it haven’t still finished yet.

At the moment,I’d like to get yii2-base make Frontend and yii1 continue to make Backend.

In yii1,i used CDbAuthManager for authManager and everything is ok with data tables such as auth_assignment, auth_item_child and auth_item.

Now in yii2 I’d like to use DbManager for authManager, but this tables contructure have changed.This mean if I use to Authorizate with yii2 I can’t access to the auth tables in yii1 above correctly.

So,How must I handle these issues to be able to continue use the auth tables in yii1 and Authorizate in yii2 ???

Everybody have any idea about this?Please help me!

Thank you very much.

you could use one of the DB managers of yii2 or yii 1 and adjust it to the schema you prefer. then use the extended version instead of the original one.

Hi CeBe!

Thank you for your reply.

I haven’t understood your thinking yet.I don’t want to change everything in Yii1.So, could you please to detail more ? What must i do in yii2?

copy the yii2 class into your project and modify them to fit the old database schema. Everything you need to adjust should be the DB queries. Then configure Yii to use your modified DbManager class instead of the yii original class.

Thank you for your quick reply!

I see.