ZF2 check if user logged in other modules

Guys how can i check in other modules if user is logged or not? Can i do that with sessions or Zend\Auth have better way to do that?

I created auth module using Zend \ Authentication component and evrything work fine.

I want separate my modules like this:

  • Auth Module
  • Custrommer Module
  • Order Module
  • Admin Module

No how with my existing Auth Module i can check in Admin, Order and Custommer modules if user logged or not? Does i need to create specific service for that?

I dont have to much expiriance with ZF, am in learing phase.

Any example and advice?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s