Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8578631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:26:05+00:00 2026-06-11T20:26:05+00:00

I have created a Zend session in a view: $user = Tools::getUserByLoginAndPassword($form); if ($user

  • 0

I have created a Zend session in a view:

$user = Tools::getUserByLoginAndPassword($form);


if ($user instanceof Membre)
{
  $sessionUser = new Zend_Session_Namespace('user');
  $sessionUser->data = $user;


  $this->_redirect('/adresse');
}

I have tested $sessionUser->data, it contains the right data.
But i need to get this session in another view, and there, it’s not working anymore…

for instance

<?php var_dump($sessionUser->data->prenom); ?>

displays “NULL”
it worked fine in the previous view but not in this one.

I have placed my Zend_Session::start();
in the init() function of my controller…

thanks in advance for your help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:26:06+00:00Added an answer on June 11, 2026 at 8:26 pm

    If you want to use your session in another view, you have to instantiate it again. So if you use the following code you should be able to access your data:

    <?php 
        $session = new Zend_Session_Namespace('user');
        Zend_Debug::dump($session->data);
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one form that extends zend form. For Adding New Record it
I have created a form with zend form. I process the data in one
I have a Form element: $Form=new Zend_Form; $Form->setAction($this->view->url(array('controller'=>'auth','action'=>'create'),null,true)) ->setMethod('post') ->setAttrib('id','auth-form') ->removeAttrib('enctype'); As can be
I have a created a zend form, works fine along with validations. Is there
I am busy with a new project based on zend framework. I have created
I have created new PDFs many times using Zend and PHP. But Now I
I have created a zend form where I have a password and confirm password
i have created a form with zend framework and this form have some elements
I have created a zend form. I have added some elements. I have put
Ok, so I am relatively new to Zend. I have created a new application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.