I’m using ZfcUser to Authenticate. Currently trying to tell if a user is logged in the layout.phtml file using …
<? if ($this->zfcUserAuthentication()->hasIdentity()): ?>
I’m guessing I need to add some path to the application config file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the view helper supplied with ZfcUser (i.e. the one that you referenced in your question, mtbikemike). Use dynamic injection to load the view helper by adding the following into the configuration of your module (module.config.php). You may need to integrate the code below with any existing contents of module.config.php of course.
That loads two view helpers, so if you only want the zfcUserIdentity helper then you can always remove the reference to zfcUserLoginWidget.