Make user object available to all Controllers in Zend?

Posted by Sled on Stack Overflow See other posts from Stack Overflow or by Sled
Published on 2010-12-26T22:44:41Z Indexed on 2010/12/26 22:54 UTC
Read the original article Hit count: 233

Hey guys,

I'm using Zend_Auth to identify a user in my application. This creates a session with the userobject.

My question is how do I make this object available to every Controller and action, so I don't have to pull it out of the session every time I need data from this object?

I'm guessing this should be done in bootstrap.php or index.php but I don't really know how to makte it available to every controller.. so any code examples would be appreciated!

Thanks!

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about session