0

I have 2 module with 1 users tabel for login and i use extension right for manage access privilage of both module, i want if user has loged in frist module user cant direct open second module, user must login frist to second module too, otherwise

thanks before, and sorry for my bad english

4

1 回答 1

-2

The user session can be accessed by all modules, so yes this is possible.

To test this out, login on module 1 (or main app).

Write the following code somewhere in module 2:

if (!Yii::app()->user->isGuest) {
  echo 'You are logged in!';
}
于 2013-10-23T09:40:10.967 回答