<?php
$loggedin = Zend_Auth::getInstance()->hasIdentity();
if (true === $loggedin) {
// user is logged in
}
?>
If you're not using Zend_Auth, you may want to store your login info somewhere accessible, like the registry or session, which should be accessible from your view helper. Storing it in the controller locks the user into that controller.
-Hector
On Thu, Jan 29, 2009 at 10:51 AM, GJ Bogaerts <gj@zigg.nl> wrote:
Hi Avi
thanks, I thought of that. But that would need to be a view helper that
directly accesses the controller, wouldn't it? Because that's where the
login status is kept.
Avi Block wrote:
>
> use a view helper
>
>
>
--
View this message in context: http://www.nabble.com/Best-way-to-access-global-view-variable-from-partialLoop--tp21722277p21733248.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论