Yii Integration With External Apps

Hello there,

I’d like to use Yii and its Yii-User and Yii-Rights modules to control the access to my self-programmed PHP apps.

All my apps run on a single server and store data in a one common database at there. To each app belongs its own user table in a database with defined access roles, but the roles and access rules in all applications are the same (it goes like:


if ($user_role=="customer") { [...accessible code...]} 

I already successfully merged all user info to Yii/Yii-User/Yii-Rights and happened to include/require the code of my apps to Yii but I’m still not getting nearer to realise how can I integrate the Yii-User-Management to provide access checking in the code of my apps. Should I rewrite them completely to achieve it, or just add slight changes to the configs and to my i[/i] rules?

Thanks a lot in advance

Jan